Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Refer Question Given the following CyclingGlass and Swimmingglass subdass are inherited from Sport VisionShop superclass Superclass : SportVision Shop Attributes: private String custorderNo private String

Refer image text in transcribed
image text in transcribed
image text in transcribed
Question
image text in transcribed
Given the following CyclingGlass and Swimmingglass subdass are inherited from Sport VisionShop superclass Superclass : SportVision Shop Attributes: private String custorderNo private String custorderDate private double deposit Pymt // customer order number // date of order public ClearVision Shop (String orderNo, orderDate, double deposit) // getter and setter methods Abstract Method: public abstract double calcharges() //method to calculate the price Subclass : Cycling Glass Attributes: private char type_glass /* T' Transition Glass, "P Polarized glass, T' - 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() // method to display the data members Details of charges are shown in Table below: Glass Type Price Transition RM 400.00 Polarized RM 450.00 Iridium RM 600.00 Subclass : SwimmingGlass Attributes: private char Type; // 'A' - Anti-fogging goggle, 'S' private String style; // "Retro", "Warrior" or "Modern short-sighted goggle Method: /ecessary constructor, getter and setter methods public double calCharges() //method to calculate the price public String toString() // method to display the data members Details of charges are shown in table below: Glass Type Price Style and Discount Retro Modern RM 180.00 Anti-Fogging goggle Short-sighted goggle 8% 10% RM 300.00 5% 10% c) Write a Java application which uses the concept of polymorphism to: I. Store data on various types glasses into an array of object. The number of data to be stored and information on each glass are given by the user. II. Determine and display the number of customers who buy cycling and swimming glass from the clearVisionShop outlet. TII Display information of all customer who have bought short-sighted goggle (Swimming Glass) (13 marks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students explore these related Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 3 weeks ago