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
Why is polymorphism important in oop?
What is the importance of oop?
What is polymorphism explain its types?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
Can we have inheritance without polymorphism?
What is property in oops?
What is the real time example of inheritance?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
What polymorphism means?
What is polymorphism and example?
Why do we use oop?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
How to improve object oriented design skills?
when to use 'mutable' keyword and when to use 'const cast' in c++
Get me an image implementation program.