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
What is multilevel inheritance in oop?
What is polymorphism in oop example?
What is polymorphism and example?
What is overriding in oops?
Why do pointers exist?
Explain the concepts involved in Object Oriented programming.
What is difference between pop and oop?
write a program to find 2^n+1 ?
What is inheritance in oop?
Which language is not a true object oriented programming language?
what is graphics
Why do we use polymorphism?
What is the purpose of enum?
Can we create object of abstract class?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.