Write a java program to implement inheritance and methodoverriding for the given problem below: [20]
1. Create a class called Courier that includes the following: a. Declare the necessary member variables which are referred to in the sample input/output. Note: CourierId and Name_of_Courier as member variables b. Create the default constructor with no parameter. c. Create a constructor with parameter to initialize the member variables. d. Generate the getters and setters. e. Create a method printShipment() to display the CourierId, Name_of_Courier and Shipping_Charge. The method should accept the Base_fare of type double as parameter. Shipping_Charge is computed using the following formula. Shipping_Charge = Base_fare + 20
2. Create a class called International_Services which inherits from the Courier class. The class should include the following: a. Declare the necessary member variables which are referred to in the sample input/output. Note: Destination and Number of Parcels as member variables b. Create a constructor with no parameter c. Constructor with parameter. It should invoke the constructor of the parent class (super class) and then initialize the member variables. d. Generate the getters and setters. e. Override the method printShipment(). The method should print the Destination,Number of Parcels and total Shipping Charge. The Total Shipping_Charge is computed using the following formula. Total Shipping_Charge = Base_fare * Number of Parcels When Total Shipping_Charge is more than 100, print the message “More Sale”, otherwise print the message “Less Sale”
3. Create a controlling class to run the program. The class should read the inputs, creates the object, and display the required output