aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Concept Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Concept" Watch "Concept" New topic
Author

Concept

Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
HI,
I am new in OOP. I want to know the difference between OOA,OOD & OOP. Also I want to know the diff between Extend, Abstract,Parent, Child, SuperClass and subclass(by an example if possible)
Thanks in advance,
angela
Avijeet Dash
Ranch Hand

Joined: Jan 21, 2001
Posts: 148
OOA - Object Oriented Analysis
OOD - OO Design
OOP - OO Programming
these are diffrent stages in a s/w life cycle. In different stages, u can apply OO.
Originally posted by Angela Jessi:
HI,
I am new in OOP. I want to know the difference between OOA,OOD & OOP. Also I want to know the diff between Extend, Abstract,Parent, Child, SuperClass and subclass(by an example if possible)
Thanks in advance,
angela

Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
Parent - The base class.
Child - The child class extends the base class.
The idea is to have on class extend the other. If class B extends A, B can do everything A can do, and more. So if A has 3 methods and 2 variables, so will B (the programmer only needs to say that class B extends class A, he does not need to rewrite the methods). We B class B inherits from class A. B may then add in more methods and variables. B can also change the behavior of the methods, this is known as overridding methods.
Abstract classes are those which of which you can never get a real instance. The are only general ideas, and placeholders in the class hierarchy. You can't say "new MyAbstractClass()" as you could with other classes.

General example. I might have an Animal class. All Animal objects have certain properties, like weight. Animals also have a method eat().
I could then subclass the Animal class, specifically, "class Cat extends Animal". (Cat subclasses Animal; Animal is the parent of Cat; Cat is the child of Animal.) Cats can eat and have a weight. Cats also have a method called purr(). Ths is something only Cat objects can do, and not Animals. I can also create a Dog class, like a Cat class, it extends Animal. Dogs have a method bark(). Cats cannot bark(). Dogs cannot purr(). Dogs do have weight and can eat().
Unlike Cat, there is no Animal in nature. It's just a concept. I would never say, "there's an animal" wihout being able to subclass it futher (cat, elephant, etc). So I would make my animal class abstract, so the program could never create something that is only an animal class, but nothing more.

Best bet is to go to your local book store, and grab a basic Java book. Chapter 2 or 3 is always an intro to Object Oriented Programming.

--Mark
hershey@vaultus.com
shailesh sonavadekar
Ranch Hand

Joined: Oct 12, 2000
Posts: 1874
Angela , it seems that you want to learn oops. there are many good books available to start with. There are many threads on the topic in this forum. Please go through them & you will find many books. Plus on net , you will find many good resources .
I hope this can be useful.
Your Friendly Bartender
Shailesh.
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Angela,
Please visit Cetuslinks.org.I started learning OO from there.
Hope this helps,
Sandeep
[This message has been edited by Desai Sandeep (edited May 23, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Concept