Question: Exercise 2 Exercise Obiectives Inheritance Problem Description Part 1: Declare a java super class named Parent that has the following members: 1. Two members' number1
Exercise 2 Exercise Obiectives Inheritance Problem Description Part 1: Declare a java super class named Parent that has the following members: 1. Two members' number1 and number2: assign 5 to number1, and 10 to number2. 2. One function name PrintSum: Print the sum of the first number with the second. Part 2: Declare a java subclass named child extend to parent class, then performs the Following: 1. Show how you can hiding the parent class variable number1. 2. Show how you can overriding the parent class method PrintSum
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
