Question: a) Write the constructor definition for both subclasses (4 marks) Subclass : SwimmingGlass Attributes: private char Type; // 'A' Anti-fogging goggle, 'S' - short-sighted goggle

 a) Write the constructor definition for both subclasses (4 marks) Subclass
: SwimmingGlass Attributes: private char Type; // 'A' Anti-fogging goggle, 'S' -
short-sighted goggle private String style; // "Retro", "Warrior" or "Modern" Method: /ecessary

a) Write the constructor definition for both subclasses (4 marks) Subclass : SwimmingGlass Attributes: private char Type; // 'A' Anti-fogging goggle, 'S' - short-sighted goggle private String style; // "Retro", "Warrior" or "Modern" Method: /ecessary constructor, getter and setter methods public double calCharges() //method to calculate the price public String toString() // method to display the data members Subclass : Cycling Glass Attributes: private char type_glass / T' Transition Glass, 'p' Polarized glass, I' Iridium glass */ private boolean uvProtection; /* with UV protection extra RM 30 will be charge to the total price */ Method: /ecessary constructor, getter and setter methods public double calcharges() //method to calculate charges=price-deposit public String toString() 7/ method to display the data members

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!