Abstract class

Posted by Nishithraj under Regular Expressions on 1/13/2010 | Views : 2855 | Status : [Member] | Replies : 4
When should we declare a class as abstract?

I know the basic concepts of abstract class.

What ever we do through abstract class, the same thing we can do through a normal class. Then why we require one more?

Mark this as answer, if it is.....

With regards
Nishithraj Narayanan



Responses

Posted by: Puneet20884 on: 1/15/2010 [Member] Bronze

Up
0
Down
Explaining In general language:

Generally when you want to put some basic functionality to be implemented by your child or derived classes you will create an Abstract class and then let them Fulfill those "must inherit" classes's must implement methods along with other behaviours of that class.

I hope it may give you the base when u must use it.

Best Regards,
Puneet Sharma - Infosys
Pune, India

Nishithraj, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rcsprakash on: 1/15/2010 [Member] Starter

Up
0
Down
when subtypes behavior is partially common . you can use abstract class
and inherit it.

Nishithraj, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bubbly on: 1/18/2010 [Member] Bronze

Up
0
Down
Hello,

When your requirements are frequently changing its better to create an abstract class.

For example, In banking applications.

++
Thanks & Regards,
Deepika

Nishithraj, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response