lightingpaster.blogg.se

Bluej program java modes
Bluej program java modes













Show with the help of an example how the following base classes can be derived in class bill to fulfill the given requirement: It is also known as derived class or sub class. It is also known as base class or parent class. It can use the inherited data members and member methods of the Super Class.

bluej program java modes

It cannot use the data members and member methods of the target class. It is the class that inherits the data members and member methods from the Super Class. It is the existing class from which new classes are derived. Question 2ĭifferentiate between super class and target.

BLUEJ PROGRAM JAVA MODES CODE

It facilitates the creation of other classes that can reuse the code implicitly inherited from the base class. Visibility modes decide the access provided to the members from the target.Ĭonstructors of base and derived classes are automatically invoked while creating the objects of derived class.Ī target does not have access to the private members of base class.Ī single target inheriting many bases is known as multilevel inheritance.Ī base class is a class from which other classes are derived. State True or False Question 1ĭuring inheritance, the public and protected members remain in the same form in the derived class.īase class is used to inherit the property of a derived class.ĭuring inheritance if no visibility mode is declared then the system automatically assumes it to be private. Question 9Ī base class derived by a target, in turn used as base class for another target is called multilevel or nested inheritance. Question 7Ī derived class inherits from a single base is known as Single inheritance.

bluej program java modes

The process of sharing characteristics with classes is called Inheritance. Question 5Ī sub/derived class is also known as Target. Question 4Ī sub/target/derived class derives a base class. Super class is the term used for base class. Question 2īecause of Inheritance the reusability of an object code comes into existence. Chapter 8 Encapsulation and Inheritance Class 10 - APC Understanding Computer Applications with BlueJĭerived class inherits from base class.













Bluej program java modes