Question: Given: public class ABC { private String name: private int id: private int revision: public ABC (string name) { } public ABC (String name, int
Given: public class ABC { private String name: private int id: private int revision: public ABC (string name) { } public ABC (String name, int id) { } } public class DEF extends ABC { private double price: private int quantity: public DEF (string name, double price) { } public DEF (String name int id, double price) { } } For both classes, you are to provide the code for the two Constructors in each class. You are not to change the headers for any of the Constructors. You may assume/use any literal value you wish for "default" values of non-static data members "id" and "price
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
