Question: Develop a Java program that includes the following (see UML illustration below): . O [+1] An interface Calculable that includes: one constant SHIPPING_RATE that is

![below): . O [+1] An interface Calculable that includes: one constant SHIPPING_RATE](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f463207b31e_19266f46320123a8.jpg)
Develop a Java program that includes the following (see UML illustration below): . O [+1] An interface Calculable that includes: one constant SHIPPING_RATE that is equal to 2.5. one abstract method: public double getshippingPrice (). When this method is implemented in a class, it should return the total shipping price according to the formula: shipping price = shipment weight X SHIPPING_RATE [+4) A public class Shipment that: implements the interfaces Calculable and comparable (a comparison of two shipments should be solely based on their weights). . has two private instance variables, String id and double weight. has a two-argument constructor that sets id and weight to given values. overrides the object's toString() method in order to return a string consisting of a shipment id and weight; for example, "ID: 10, Weight=5". implements any additional required methods (the ones that if not implemented will cause a compilation error). Don't write any setter or getter methods. [+2.5) A public class SpecialShipment that: o extends shipment . has a private instance variable, String contents . has a three-argument constructor that sets the value of id, weight, and contents to given values. overrides the Object's toString() method in order to return a string consisting of a shipment id, weight, and contents; for example, "ID: 10, Weight=5. Contents: Electronics". (+2.5] A public class Shipment Manager that has: . a private array shipments that has two elements: one of the type Shipment and one of the type Specialshipments. Assume any values for the attributes. . a method public double getTotal shippingPrice () that returns the total shipping price for all items in the array shipments. > Calculable > Comparable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
