What is the correct syntax for inheritance?




1) class aclass : public superclass


2) class aclass inherit superclass


3) class aclass <-superclass

Answer Posted / uuh

Obviously, it depends on which programming language is
being used.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is super in oop?

597


What are the 4 main oop principles?

685


What is the problem with multiple inheritance?

584


What is polymorphism what is it for and how is it used?

574


What is difference between inheritance and polymorphism?

571






IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

1577


Why is polymorphism needed?

594


What is the difference between encapsulation and polymorphism?

592


Whats is abstraction in oops?

591


What are the three parts of a simple empty class?

1458


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1662


What does and I oop and sksksk mean?

650


c++ program to swap the objects of two different classes

1761


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

1618


What is interface? When and where is it used?

1664