Question: QUESTION 2 [25 Marks] 1) Define Inheritance in programming. [4 Marks] 2) What is the main advantage or benefit of Inheritance in programming? [2 Marks]
QUESTION 2 [25 Marks]
1) Define Inheritance in programming. [4 Marks]
2) What is the main advantage or benefit of Inheritance in programming? [2 Marks]
3) What is the purpose of accessor methods defined in a class. Give an example on how to define an accessor method in java? [5 Marks]
4) Java distinguishes between two types of exceptions namely; checked exceptions and unchecked exceptions. Briefly define each of these exceptions and give an example of an exception class of each type
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
