Question: Package model vehicles: You need to create classes in the model.vehicles package following principles of inheritance appropriately. The classes need to be created based on

 Package model vehicles: You need to create classes in the model.vehicles

package following principles of inheritance appropriately. The classes need to be created

based on the guidelines given below. You can add class private public

fields, methods, apart from the ones mentioned in the guidelines if necessary.

Unnecessary class members will be penalized. Below just gives the guidelines, you

can move around members between the parent-child for a better class design.

Do not change the name and type of the class members, however,

Package model vehicles: You need to create classes in the model.vehicles package following principles of inheritance appropriately. The classes need to be created based on the guidelines given below. You can add class private public fields, methods, apart from the ones mentioned in the guidelines if necessary. Unnecessary class members will be penalized. Below just gives the guidelines, you can move around members between the parent-child for a better class design. Do not change the name and type of the class members, however, method signatures can be changed. Vehicle You should pre-pend Abstract to the class name if needed Every vehicle should have the following fields (they can have other fields if necessary) Class Fields Description int myVehicleID Unique ID is auto generated by rental manager during inventory creation. It starts from 1 and generated sequentially String myVIN Unique Vehicle Identification Number String myName The name of the vehicle Vehicle can be of 3 types: Bicycle, Motorbike, Car Vehicle can be available/unavailable for renting Every Vehicle has a myRentalAmount (Big Decimal value in $) per day 1 The BASE_FARE for renting any vehicle is $10.00 per day All fares should be a Big Decimal value in $ Bicycle: The CYCLE_FARE for renting bi-cycles is same as BASE_FARE per day BiCycles can be of 4 types: Road, Mountain, Cruiser, Hybrid The rental fare for Road BiCycles, is the same as the normal CYCLE_FARE The rental fare for Mountain" BiCycles, is 1% more than the normal CYCLE_FARE The rental fare for Cruiser BiCycles, is 2% more than the normal CYCLE_FARE The rental fare for Hybrid BiCycles, is 4% more than the normal CYCLE_FARE Use the function calculateRentalAmount () to compute the total rental fare depending on the cycle type. The string representation of BiCycle should follow the below example: Bicycle (ID:6, Name: Roadies, VIN:C100, CanRent?:true, CycleType: Road) The equals and hashcode methods should be based on all fields except myRentalAmount Motorbike: The BIKE_FARE for renting motor-bikes is twice the BASE_FARE per day If the MotorBike is of "Touring type, an additional $5 is charged above the BIKE_FARE Use the function calculateRentalAmount () to compute the total rental fare depending on the above rules. The string representation of Motorbike should follow the below example: Motorbike (ID:5, Name: Bike2, VIN:B101, CanRent?:true, IsTouring?:true) The equals and hashcode should be based on all fields except myRentalAmount Car: The CAR_FARE for renting cars is thrice the BASE_FARE per day If the car is a Luxury car, an additional $10.00 is charged above the CAR_FARE If the car has Navigation, an additional $1.00 is charged above the CAR_FARE If the car is a DrivingAssistance, an additional $2.00 is charged above the CAR_FARE Use the function calculateRentalAmount () to compute the total rental fare depending on the about rules. The string representation of Car should follow the below example: Car (ID:3, Name: BMW, VIN:V102, CanRent?:true, IsLuxury?:true, HasNavigation?:true, HasAssistance?:true) The equals and hashcode should be based on all fields except myRentalAmount Rental Manager: Field myVehicleList myRegistration Method Parameterized Constructor Description HashMap which saves with Key= myVehicleID, Value=Vehicle Object A reference to the Registration object created for registration/login Parameters Return Type Description Registration Assigns initial values for Object myRegistration myVehiclelist is initialized with inventory by calling the function generateInventory () The parameters should be checked for null values and should implicitly throw NullPointerException for null parameters Map Creates 8 vehicle objects by assigning for the vehicles can be seen in the execution output shown below. generateInventory getMyVehicleList Getter for myVehicleList Map printOptions From the inventory generated by generateInventory method, it selects the available vehicles and prints them as shown below Returns the registration object getMyRegistration Registration object Registration: This class needs to be modified Method Parameters printSignin Return Type boolean Description Only when Login option is selected and login is successful, printSignin should return true. It should return false in all other cases. RentalMain: This class needs to be modified When login is successful, i.e., printsigin returns true, create an Object of RentalManager and call the printOptions function from the RentalManager class. Expected Output: When you run the RentalMain class this should be the expected output (Exact formatting should be followed) 2. Problems Javadoc Declaration Console Coverage AH ESP RentallMain (1) Plava Application] C:\Program Files\avaloperijdk-1202_windows-x64_bin\jdk-12.0.2\binjavaw.exe (Oct 31, 2019, 10,06:44 AM) Password: 1234 Login Successfull *************List of available vehicles:****************** Car (ID:1, Name:Fiat, VIN:V100, CanRent?:true, IsLuxury?: false, HasNavigation?:false, HasAssistance?:false) Car (ID:2, Name: Outback, VIN:V101, CanRent?:true, IsLuxury?:true, HasNavigation?:true, HasAssistance?:false) Car (ID:3, Name: BMW, VIN:V102, CanRent?:true, IsLuxury?:true, HasNavigation?:true, HasAssistance?:true) MotorBike (ID:4, Name : Bike1, VIN:B100, CanRent?:true, IsTouring?:false) MotorBike (ID:5, Name : Bike2, VIN:B101, CanRent?:true, IsTouring?:true) Bicycle (ID:6, Name: Roadies, VIN:C100, CanRent?:true, CycleType: Road) Bicycle (ID:7, Name: Cruiser, VIN:C101, CanRent?:true, CycleType:Cruiser) Bicycle (ID:8, Name : Mountain, VIN:C102, CanRent?:true, CycleType : Mountain) Task Executive Summary - Submission on canvas with correct version number Source Code - Submission to SVN model.vehicles (correct use of package) Creation of correct class hierarchy Vehicle Class - Appropriate Class Name Vehicle Class - Appropriate fields created with correct modifiers Vehicle Class Appropriate methods created Vehicle Class - Use of abstract methods when necessary Car - correct hierarchy used Car - correct fields created with proper modifiers Car - implementation of CalculateRentalAmount() Car - implementation of toString() Car - implementation of equals() and hashCode() BiCycle - correct hierarchy used BiCycle - correct fields created with proper modifiers BiCycle - implementation of CalculateRentalAmount(). BiCycle implementation of toString() BiCycle implementation of equals() and hashCode() MotorBike - correct hierarchy used MotorBike correct fields created with proper modifiers MotorBike implementation of CalculateRentalAmount() MotorBike implementation of toString() MotorBike implementation of equals() and hashCode() RentalManager - correct fields with proper modifiers created Rental Manager - constructor implementation Rental Manager generateInventory implementation RentalManager getMyVehicleList implementation Rental Manager - getMyRegistration implementation RentalManager - printOptions implementation Registration - printSignin method update Rental Main-main method update Correct Project Name and Executive summary name No Errors and Warnings (except reasonable ones which should be clearly explained in executive summary) Proper Java docs and Header comments Max Score Possible 2 2 2 10 2 5 10 2 2 2 3 2 5 2 2 3 2 5 2 2 3 2 5 2 2 5 1 1 3 1 1 1 3 3 Package model vehicles: You need to create classes in the model.vehicles package following principles of inheritance appropriately. The classes need to be created based on the guidelines given below. You can add class private public fields, methods, apart from the ones mentioned in the guidelines if necessary. Unnecessary class members will be penalized. Below just gives the guidelines, you can move around members between the parent-child for a better class design. Do not change the name and type of the class members, however, method signatures can be changed. Vehicle You should pre-pend Abstract to the class name if needed Every vehicle should have the following fields (they can have other fields if necessary) Class Fields Description int myVehicleID Unique ID is auto generated by rental manager during inventory creation. It starts from 1 and generated sequentially String myVIN Unique Vehicle Identification Number String myName The name of the vehicle Vehicle can be of 3 types: Bicycle, Motorbike, Car Vehicle can be available/unavailable for renting Every Vehicle has a myRentalAmount (Big Decimal value in $) per day 1 The BASE_FARE for renting any vehicle is $10.00 per day All fares should be a Big Decimal value in $ Bicycle: The CYCLE_FARE for renting bi-cycles is same as BASE_FARE per day BiCycles can be of 4 types: Road, Mountain, Cruiser, Hybrid The rental fare for Road BiCycles, is the same as the normal CYCLE_FARE The rental fare for Mountain" BiCycles, is 1% more than the normal CYCLE_FARE The rental fare for Cruiser BiCycles, is 2% more than the normal CYCLE_FARE The rental fare for Hybrid BiCycles, is 4% more than the normal CYCLE_FARE Use the function calculateRentalAmount () to compute the total rental fare depending on the cycle type. The string representation of BiCycle should follow the below example: Bicycle (ID:6, Name: Roadies, VIN:C100, CanRent?:true, CycleType: Road) The equals and hashcode methods should be based on all fields except myRentalAmount Motorbike: The BIKE_FARE for renting motor-bikes is twice the BASE_FARE per day If the MotorBike is of "Touring type, an additional $5 is charged above the BIKE_FARE Use the function calculateRentalAmount () to compute the total rental fare depending on the above rules. The string representation of Motorbike should follow the below example: Motorbike (ID:5, Name: Bike2, VIN:B101, CanRent?:true, IsTouring?:true) The equals and hashcode should be based on all fields except myRentalAmount Car: The CAR_FARE for renting cars is thrice the BASE_FARE per day If the car is a Luxury car, an additional $10.00 is charged above the CAR_FARE If the car has Navigation, an additional $1.00 is charged above the CAR_FARE If the car is a DrivingAssistance, an additional $2.00 is charged above the CAR_FARE Use the function calculateRentalAmount () to compute the total rental fare depending on the about rules. The string representation of Car should follow the below example: Car (ID:3, Name: BMW, VIN:V102, CanRent?:true, IsLuxury?:true, HasNavigation?:true, HasAssistance?:true) The equals and hashcode should be based on all fields except myRentalAmount Rental Manager: Field myVehicleList myRegistration Method Parameterized Constructor Description HashMap which saves with Key= myVehicleID, Value=Vehicle Object A reference to the Registration object created for registration/login Parameters Return Type Description Registration Assigns initial values for Object myRegistration myVehiclelist is initialized with inventory by calling the function generateInventory () The parameters should be checked for null values and should implicitly throw NullPointerException for null parameters Map Creates 8 vehicle objects by assigning for the vehicles can be seen in the execution output shown below. generateInventory getMyVehicleList Getter for myVehicleList Map printOptions From the inventory generated by generateInventory method, it selects the available vehicles and prints them as shown below Returns the registration object getMyRegistration Registration object Registration: This class needs to be modified Method Parameters printSignin Return Type boolean Description Only when Login option is selected and login is successful, printSignin should return true. It should return false in all other cases. RentalMain: This class needs to be modified When login is successful, i.e., printsigin returns true, create an Object of RentalManager and call the printOptions function from the RentalManager class. Expected Output: When you run the RentalMain class this should be the expected output (Exact formatting should be followed) 2. Problems Javadoc Declaration Console Coverage AH ESP RentallMain (1) Plava Application] C:\Program Files\avaloperijdk-1202_windows-x64_bin\jdk-12.0.2\binjavaw.exe (Oct 31, 2019, 10,06:44 AM) Password: 1234 Login Successfull *************List of available vehicles:****************** Car (ID:1, Name:Fiat, VIN:V100, CanRent?:true, IsLuxury?: false, HasNavigation?:false, HasAssistance?:false) Car (ID:2, Name: Outback, VIN:V101, CanRent?:true, IsLuxury?:true, HasNavigation?:true, HasAssistance?:false) Car (ID:3, Name: BMW, VIN:V102, CanRent?:true, IsLuxury?:true, HasNavigation?:true, HasAssistance?:true) MotorBike (ID:4, Name : Bike1, VIN:B100, CanRent?:true, IsTouring?:false) MotorBike (ID:5, Name : Bike2, VIN:B101, CanRent?:true, IsTouring?:true) Bicycle (ID:6, Name: Roadies, VIN:C100, CanRent?:true, CycleType: Road) Bicycle (ID:7, Name: Cruiser, VIN:C101, CanRent?:true, CycleType:Cruiser) Bicycle (ID:8, Name : Mountain, VIN:C102, CanRent?:true, CycleType : Mountain) Task Executive Summary - Submission on canvas with correct version number Source Code - Submission to SVN model.vehicles (correct use of package) Creation of correct class hierarchy Vehicle Class - Appropriate Class Name Vehicle Class - Appropriate fields created with correct modifiers Vehicle Class Appropriate methods created Vehicle Class - Use of abstract methods when necessary Car - correct hierarchy used Car - correct fields created with proper modifiers Car - implementation of CalculateRentalAmount() Car - implementation of toString() Car - implementation of equals() and hashCode() BiCycle - correct hierarchy used BiCycle - correct fields created with proper modifiers BiCycle - implementation of CalculateRentalAmount(). BiCycle implementation of toString() BiCycle implementation of equals() and hashCode() MotorBike - correct hierarchy used MotorBike correct fields created with proper modifiers MotorBike implementation of CalculateRentalAmount() MotorBike implementation of toString() MotorBike implementation of equals() and hashCode() RentalManager - correct fields with proper modifiers created Rental Manager - constructor implementation Rental Manager generateInventory implementation RentalManager getMyVehicleList implementation Rental Manager - getMyRegistration implementation RentalManager - printOptions implementation Registration - printSignin method update Rental Main-main method update Correct Project Name and Executive summary name No Errors and Warnings (except reasonable ones which should be clearly explained in executive summary) Proper Java docs and Header comments Max Score Possible 2 2 2 10 2 5 10 2 2 2 3 2 5 2 2 3 2 5 2 2 3 2 5 2 2 5 1 1 3 1 1 1 3 3

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!