aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Object Oriented Design Principals in Real time scenarios for team Lead level of java interview ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Object Oriented Design Principals in Real time scenarios for team Lead level of java interview ?" Watch "Object Oriented Design Principals in Real time scenarios for team Lead level of java interview ?" New topic
Author

Object Oriented Design Principals in Real time scenarios for team Lead level of java interview ?

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
Hi All,

i have gone through the interview and found there are few questions related to class/Interface design with real time case studies.

I am not been involved in this area in my past experiences but i feel i need to dig out something more in basic design laws of OOps in java and needs more hands on the same in order to get more exposure on the same level.

I have tried to find out in net but there is no such information available to boost this area.

I need someone who is aware of the concepts or real time example how to use the Interfaces and classes in different cases that would be great.

Thanks
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4456
    
    6

Assuming you mean real-world rather than real-time, I suggest you look at SOLID design principles, the DRY principle, and the KISS principle


Junilu - [How to Ask Questions] [How to Answer Questions]
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
Thanks. I don't its helpful.

I mean to say let consider this example.

there are three interface A,B,C with some plan.

and there are three company AirlTel,VirginMobile,Vodaphone

can we make a class design so that AirTel can use only Plan A no other company can use this plan. how can we make sure...

these kind of example to make class design with real time example.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4456
    
    6

You asked about object-oriented design principles, which by nature are not targeted to any specific problem but rather are there to help you come up with good solutions. Principles are meant to guide you, they are not solutions in and of themselves. Saying that design principles like SOLID, DRY, and KISS are not helpful is like saying that the principle of cause and effect in physics is not helpful because it doesn't tell you how to make a rocket capable of reaching outer space.

And again, regarding your use of the term "real time" -- it doesn't mean what I think you think it means. See real-time definition vs real-world definition
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
that true and agree with you.

Oops can give the specification only its up to us to make this concept in use with real time application.

Let me put my question in other way in next question.

Thanks
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4456
    
    6

Can you please clarify what you mean by "real time application"? See the links to its commonly accepted definition and to the term I believe you meant to use instead in my previous reply.
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
very simple. real time you got confused.

Its real world ..means real objects in daily to daily life.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4456
    
    6

Prabhat Ranjan wrote:very simple. real time you got confused.

Your use of "real-time" was dubious but I was hardly confused about it. I'm perfectly clear on what those terms really mean.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7653
    
  19

Prabhat Ranjan wrote:Its real world ..means real objects in daily to daily life.

I'm afraid your question is far too vague to really give you a proper answer; however, one thing I would say is that naming is very important.

If you have a chess board, call the class that defines it ChessBoard, not CBoard or some other acronym that saves you a few characters of typing, but only means something to you.

In your AirTel example above, the likelihood is that you will have a Company and a Plan; but whether they should be classes or interfaces only you can tell; and you certainly haven't provided us with enough information to make that judgement for you.

Remember: programs are meant to be read by other people; so if you don't make them easily understandable, they will be put in the garbage bin as soon as you've gone.

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2264
    
    3

I'd say that the goal that our friend Prabhat Ranjan is trying to achieve (if I understood correctly) will unfortunately take a bit longer than a few hours... other than the principles already mentioned, there are also the Principles of Object-Oriented Design. And other than these principles, there are also the Design Patterns, Core J2EE Patterns (which I still consider important to know even nowadays), Domain-Driven Design, Patterns of Enterprise Application Architecture and many others...

And also, a good tip is, try to come up with a problem and solve it with OO. The chess example mentioned by our good buddy Winston is a good one. Try to solve it with Java, for instance!

If you want to be a good OO designer, this is just a piece of the long road ahead of you...


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
yes that's true ..it will take some time after solving many comon problems.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object Oriented Design Principals in Real time scenarios for team Lead level of java interview ?