Question: in JAVA please define the following interface, its child classes and a demo class Consider the class diagram for a Shipping Calculator system given below:

in JAVA please define the following interface, its child classes and a demo class

in JAVA please define the following interface, its child classes and a

demo class Consider the class diagram for a Shipping Calculator system given

Consider the class diagram for a Shipping Calculator system given below: selntertace> ShippingCost + calculateShippingCost doublej: double FlatRateShipping StandardShipping MAX WEIGHT ALLOWED: couble FLAT RATE COST double BASE WEIGHT: double BASE CHARGE:double EXTRA POUND COST double + calculate Shipa ngCost(double double + calculateShippingCostsdouble): dcuble Extends EXPRESS MAIL SURCHARGE: double + calculateShippingCostsdouble: dcuble For this problem, you will be writing code to meet the design outlined in the above diagram and will provide a driver class as well. A brief description of the interface and classes is given below: ShippingCost: The abstract method in the interface takes one double parameter that specifies the weight of the package to be shipped. It returns the cost of shipping that package ElatRateShipping: Applies a flat rate for weight up to MAX_WEIGHT_ALLOWED. You can set the values for the two constants. If this option is chosen by the customer, as long as the weight of the package is less than or equal to the MAX WEIGHT ALLOWED, the cost of shipping would be the FLAT RATE COSI StandardShipping: Applies a BASE_CHARGE per pound up to BASE_WEIGHT. Each additional pound is charged at EXTRA POUND_COST. You can set the values for the two ExpressShipping: Applies an EXPRESS MAIL SURCHARGE to the standard shipping cost. You can set the values for the constant

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!