Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is abstract class ?
when is used in real time ?
give a exp

Answer Posted / ramakrishna yechuri

An Abstract class ia class which consists at least one
abstract method(in complete method).
Advantage is the user can implement the method body as per
his require ment.

ex: connect(){} ,I implement to conncect to oracle
database,u implement to conncet to sybase,my friend
implement this method to connect to oracle db. same connect
method acting in different forms (polymorphisim).
Note: Always Interfaces is better than Abstract class,becoz
Programming to Interface is better than programming to
classes.
To avoid dependency Injection problems.(spring).

Is This Answer Correct ?    14 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you use inheritance in unity?

1061


What is a function in oop?

1072


What is destructor example?

1033


What do you mean by overloading?

1058


Why do we use inheritance?

1100


What is the full form of oops?

1166


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1974


What is class and example?

1154


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

2579


write a C++ program for booking using constructor and destructor.

2525


What is polymorphism give a real life example?

1024


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2602


What is polymorphism in oops with example?

1023


How do you define a class in oop?

1107


What are the three main types of variables?

1110