FedCR is a car hire company that offers vehicle rentals to its clients. Clients are able tohire vehicles according to availability and preference. FedCR offers 10% loyalty discounton the rental fees...

1 answer below »
FedCR is a car hire company that offers vehicle rentals to its clients. Clients are able to hire vehicles according to availability and preference. FedCR offers 10% loyalty discount on the rental fees to members of its loyalty club. No discount is offered to standard clients who are not members of the loyalty club. A special discount of 20%, is offered to clients who are also employees of the company. You have been hired to design and develop a Java application for FedCR employees to manage the car rental system. The application should have an interactive menu, allowing the user to select the type of client (standard, loyalty member or staff member) making the booking and determine and track the appropriate discounts. The menu should also provide different other options, such as displaying clients list, generating a report to display the current payments received, and quitting the execution. In the report, the payments should be broken down into different categories of bookings such as standard, loyalty and staff, and the total discounts given in each category (using CRICOS Provider No. 00103D ITECH7201 Assignment 1 SEM2 2022 Page 2 of 4 the discounted values where appropriate). At this stage, there is no need for data to persist once the program finishes execution. FedCR wants the system to be flexible so that users can include additional functionality at a later date without having to rewrite the entire program. This means you will need to use an interface for processing payments, and polymorphism for the various payment classes, so that new, different payment types may be added at a later date with minimal updates to the code. FedCR asked that you provide it with some documentation before you commence coding so that the manager is able to verify that the program you intend to code will address the business requirements. The manager would like to see use cases that summarizes the requirements in written format, as well as use case diagrams, class diagrams and sequence diagrams. Start-up code (A1_BaseCode.zip) is provided for your convenience. You are free to use, update and build your program on this. A sample expected output of an execution of a complete program is also attached. Notice in the sample output clients 1, 2, and 3 are hard coded in the program; clients 4, 5, and 6 are entered at execution. Similarly, your program should include hard coded clients, at least one client in each category.
Answered Same DayAug 30, 2022

Answer To: FedCR is a car hire company that offers vehicle rentals to its clients. Clients are able tohire...

Aditi answered on Aug 30 2022
75 Votes
Solution
import java.util.*;
interface Carhire
{
void book();
void selectCar(int discount)
;
void displayClients();
void generateReport();
}
public class FedCR implements Carhire
{
int count=0;
String input;
List report = new ArrayList();
List Clientnames = new ArrayList();
String userType="";
int price;
int discount;
String modelType="";
Double bill=0.0;
public void book()
{
System.out.print("\nEnter Your Name : ");
Scanner scanner = new Scanner(System. in);
input = scanner. nextLine();
Clientnames.add(input);


System.out.println("\n->User Type(1.Staff,2.Loyalty member,3.Standard)?");
Scanner in = new Scanner(System.in);
int choice=in.nextInt();
switch (choice)
{
case 1: userType="Staff";
this.discount=20;
selectCar(discount);
break;
case 2: userType="Loyalty member";
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here