Question: Using the given Addition class as a parent class, create two child classes Multiplication and Subtraction that override the nNumbers() method in the Addition class



Using the given Addition class as a parent class, create two child classes Multiplication and Subtraction that override the nNumbers() method in the Addition class for their own. Your Multiplication and Subtraction classes should NOT have ANY of their own class variables but instead utilize their parents (Addition) class variable. Your program should run without error using this Driver class without any modifications. Submit you Multiplication and Subtraction classes for grading. public class Addition { int[] array; Addition(int[] array) { this.array = array: public int nNumbers() { int result = 0; for(int i = 0; i 1) { array = new int[n]; System.out.println("Please enter " +n + " numbers separated by enters"); for(int i = 0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
