Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
provide the simple answer that i can easily understand?
Posted
Comments
PIEBALDconsult 15-May-14 23:21pm    
No. And there is no "S" in "OOP".
Karen Mitchelle 15-May-14 23:29pm    
:laugh: why can't we 5ed a comment? :)
PIEBALDconsult 15-May-14 23:58pm    
Your laughter is reward enough.

An abstract class is like a general description of a group of objects but this object itself cannot be made into a real meaningful object.

For example a class for Shape it too abstract and not well defined to make into an object, but all shapes will have variables and actions that are similar.

C#
class Shape
{
//variables
int nSides;
bool isRegular;
//methods
double GetArea();
double GetPerimeter();
//void Draw();
}


Instead of putting void Draw() in class Shape, it could be defined in an interfaces IDrawable.
Then it could be an action used for any kind of graphical object.

C#
interface IDrawable
{
void Draw();
}


So then a concrete class like Square would be a Shape that is Drawable.
 
Share this answer
 
v2
 
Share this answer
 
v2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900