Question: need help with this problem COSC 210 COS210 - O ct Oriented and GUI Programming Assignment 2 Problem Statement Deepa rental application may use to

need help with this problem  need help with this problem COSC 210 COS210 - O ct
Oriented and GUI Programming Assignment 2 Problem Statement Deepa rental application may

COSC 210 COS210 - O ct Oriented and GUI Programming Assignment 2 Problem Statement Deepa rental application may use to produce a receipt. A receipt will be formatted EZ - RIDER Rental Receipt cu License Driver Telephone John Jones PA 12343 724-555-8345 VISA 12345678012 Credit card Vehicle ratas Rent class : Mercedes 350E : PA 342399 Luxury Sedan : $ 95.00 $ 545.00 ily Rate Weekly Rate Date/Time out Date/Time in Rental charge Airport Tax Sales Tax Total 01/10/2017 at 10:45 01/20/2017 at 11:44 : S 830.00 S 150.00 : $ 49.80 : S1029.80 For this application create four main classes for customer, rental class, vehicle, and rental agreement. The customer class should have six pieces of information (ie, instance variables) including customer name (as a String), driver's license state (as a String). driver's license number (as an int), telephone number (as a String), credit card type (as a String), and credit card number (as a long). A rental class represents the rental terms for a class of vehicle. For example Compact, Mid-Size, Full Size, Sport etc. are classifications of cars with each time having different rental terms. A rental class should have three pieces of information: a rental class name (as a String), a daily rate as a double) and a weekly rate (as a double). A vehicle should have four pieces of information: a makermodel (as a String), state issuing a tag (as a String), a tag number (as a String) and a rental class (as a rental class). Lastly a rental agreement is the agreement of a customer to rental a given vehicle together with the rental terms, date/time out and date/time in. Thus a rental agreement has 4 pieces of information: the customer, the vehicle, date/time out (as a LocalDateTime) and date/time in. For your customer class, provide a constructor accepting values for all instance variables. Provide getter methods for all instance variables, but setter methods for only the telephone, credit card type and credit card number variables. Pro c es provide a constructor einges for all instance that will be ava l y whether the whicle. Provide only c ome arables. Provide a efter method for only the datetime in a Teresa d e Java's LocalDateTime class. For this class, however Locate dateTimeout - LocalDateTimeof(2017, 1, 10, 8.45); The shove emple creates a LocalDateTime for 1/10/2017 at 8.45 in the rental agreement provide getRentalCharge.getAirport Tax Retsale and per Total methods. The getRentalCharge() is to return the number of days fented times the daily rental rate. The petAirport Tax is to return the number of day t imes 15.00 The per Taxis to return the rental change times 69. The get Total is to retum the sum of rental charge airport tax, and tax In addition to the special get methods, provide a print receipt method that will print the receipt ording to the above format A day is a 24 hours period. However, there is a one hour grace in return a r. That is if a car is returned after 24 hours and 59 minutes, then only one day is used in the computations, 25 hours is two days. To compute the number of days between dateTimeOut and dateTimeln, use the following code: int noDays - Duration between(dateTimeOut,dateTime In).plusMinutes (23" 60). toDays(); BONUS 5 points: have the computation of rental charge use weekly rate to the best benefit of the customer. The data in the example is using the weekly rate. That is one week charge plus three days at the daily rate. The weekly rate should be used where it benefits the customer even in cases where it is better than the daily rate. For example if in the example the vehicle was rented 6 days and I week rental charges should be used In addition, develop another class to test your classes by printing three separate, and different, receipts. This class will have a main method. In the main method, create instances of your classes in order to print the three separate receipts. Thus, you will hard code inside the main the values to be used when instantiating your classes. With the exception of the fixed values given in the computations above (for example.06 for sales tax rate), do not hard code any other data within your business classes. For each receipt instance, call the print method to print the receipt. Make sure to call COSC 210 COS210 - O ct Oriented and GUI Programming Assignment 2 Problem Statement Deepa rental application may use to produce a receipt. A receipt will be formatted EZ - RIDER Rental Receipt cu License Driver Telephone John Jones PA 12343 724-555-8345 VISA 12345678012 Credit card Vehicle ratas Rent class : Mercedes 350E : PA 342399 Luxury Sedan : $ 95.00 $ 545.00 ily Rate Weekly Rate Date/Time out Date/Time in Rental charge Airport Tax Sales Tax Total 01/10/2017 at 10:45 01/20/2017 at 11:44 : S 830.00 S 150.00 : $ 49.80 : S1029.80 For this application create four main classes for customer, rental class, vehicle, and rental agreement. The customer class should have six pieces of information (ie, instance variables) including customer name (as a String), driver's license state (as a String). driver's license number (as an int), telephone number (as a String), credit card type (as a String), and credit card number (as a long). A rental class represents the rental terms for a class of vehicle. For example Compact, Mid-Size, Full Size, Sport etc. are classifications of cars with each time having different rental terms. A rental class should have three pieces of information: a rental class name (as a String), a daily rate as a double) and a weekly rate (as a double). A vehicle should have four pieces of information: a makermodel (as a String), state issuing a tag (as a String), a tag number (as a String) and a rental class (as a rental class). Lastly a rental agreement is the agreement of a customer to rental a given vehicle together with the rental terms, date/time out and date/time in. Thus a rental agreement has 4 pieces of information: the customer, the vehicle, date/time out (as a LocalDateTime) and date/time in. For your customer class, provide a constructor accepting values for all instance variables. Provide getter methods for all instance variables, but setter methods for only the telephone, credit card type and credit card number variables. Pro c es provide a constructor einges for all instance that will be ava l y whether the whicle. Provide only c ome arables. Provide a efter method for only the datetime in a Teresa d e Java's LocalDateTime class. For this class, however Locate dateTimeout - LocalDateTimeof(2017, 1, 10, 8.45); The shove emple creates a LocalDateTime for 1/10/2017 at 8.45 in the rental agreement provide getRentalCharge.getAirport Tax Retsale and per Total methods. The getRentalCharge() is to return the number of days fented times the daily rental rate. The petAirport Tax is to return the number of day t imes 15.00 The per Taxis to return the rental change times 69. The get Total is to retum the sum of rental charge airport tax, and tax In addition to the special get methods, provide a print receipt method that will print the receipt ording to the above format A day is a 24 hours period. However, there is a one hour grace in return a r. That is if a car is returned after 24 hours and 59 minutes, then only one day is used in the computations, 25 hours is two days. To compute the number of days between dateTimeOut and dateTimeln, use the following code: int noDays - Duration between(dateTimeOut,dateTime In).plusMinutes (23" 60). toDays(); BONUS 5 points: have the computation of rental charge use weekly rate to the best benefit of the customer. The data in the example is using the weekly rate. That is one week charge plus three days at the daily rate. The weekly rate should be used where it benefits the customer even in cases where it is better than the daily rate. For example if in the example the vehicle was rented 6 days and I week rental charges should be used In addition, develop another class to test your classes by printing three separate, and different, receipts. This class will have a main method. In the main method, create instances of your classes in order to print the three separate receipts. Thus, you will hard code inside the main the values to be used when instantiating your classes. With the exception of the fixed values given in the computations above (for example.06 for sales tax rate), do not hard code any other data within your business classes. For each receipt instance, call the print method to print the receipt. Make sure to call

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!