Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Java OO Design  - general knowledge

Posted on 2012-04-11
7
Medium Priority
?
518 Views
Last Modified: 2012-04-12
Hi,

First, this is not an assignment.

What is the best answer if people ask you what is OO Design in Java?

You guys are Java experts, how do you tell people what is OO Design in Java if you have a job interview? I know this is a very common question when I do a google search, but not sure what is the best answer for this..

Thankyou in advance
0
Comment
Question by:unistudent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 23

Expert Comment

by:basicinstinct
ID: 37835505
I explain it as creating "black box" reusable components. Each black box has a known interface which other code can reuse without knowing what's inside the box.

I go on to liken it to having two teams making hardware - one team builds headphones, the other builds iPhones. Neither team cares about the inner workings of the other hardware. Instead they both design to a known interface, in this case the headphone jack.
0
 

Author Comment

by:unistudent
ID: 37835619
Thanks. basicinstinct.

This sounds like a abstract class for me, isn't it? Please advise
Doesn't the following example I gave you, can tell this is a OO Design? Please advise.
For example,
like building a employee record, an employee can be a management role with different salary rank, also, an employee can be a worker with different salary range and applied for penalty rates.

abstract class employee{
  private  string name;
  public   integer emplyeeId;
  abstract  double salary ()
}

class management extend employee {
   double salary() {
   }

}

class worker extend employee {
   double salary () {

  }
   
}
0
 
LVL 23

Expert Comment

by:basicinstinct
ID: 37835979
Well in my example above I didn't really cover class vs object... Everything in my example was an object.

I normally explain classes vs objects either like baking:

A class is a (cake) recipe.
An object is a cake.

Or construction:
A class is a blueprint.
An object is a building.

Your example seems sound.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:unistudent
ID: 37836280
Thanks for advice.

my last question. let's say when i explain to people what is Java OO design, should I just give them this example?

 I should tell them I create employee abstract class and two subclasses linked to their assoicated super class. isn't it?

Yes. I do realise even I can write java OO program, but I am confused and dont know how to explain to people the difference in between class and object. and how OO design used these two technical term..

Thanks
0
 
LVL 12

Accepted Solution

by:
Sharon Seth earned 2000 total points
ID: 37836391
Class and Object are OO concepts . They simply relate to things in the real world . Just like in the posts above , blueprint , buildgin , cake and recipes - all there are real world things . OO design allows you to model s/w components in line with the real world objects.

Coming to your question - When ppl ask you what is java OO design , you got to tell them about more than just classes and objects . You got to tell how each of the OO concepts(abstraction , inheritance and so on) can be implemented in  Java
0
 

Author Comment

by:unistudent
ID: 37836463
Thank you.
Now it is clear now. So next time if people ask me about java OO design I will mention about abstraction and inheritance in writing OO Java program.
0
 
LVL 12

Expert Comment

by:Sharon Seth
ID: 37836936
Not just abstraction and inheritance . I meant all the OO concepts
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question