Question
Preface: I am in a very intro level programming class. We are using the book an object-oriented approach to programming logic and design. It is
Preface: I am in a very intro level programming class. We are using the book an object-oriented approach to programming logic and design. It is more of a design class with covering pseudocode in it. We don't use an official programing language. We follow the cal poly pseudocode standard.
Create a class whose main() method assigns cars and rental fees to customers for the current day. The program continuously prompts for input data until the user indicates the end of the data has been reached. Write just pseudocode. The following are the requirements. We are working with arrays and methods in this section.
this is the type of format we use for our pseudocode.
Input data includes the following: Customer name Code for desired car type-A for Antique Car or L for Luxury Car Number of days for the rental In the main() method, create four parallel arrays. The first three contain car descriptions, daily rental fees, and the car-type code, as follows: Description Daily Fee Code 1967 Ford Mustang 1922 Ford Model T 2008 Lincoln Continental 2002 Lexus 2007 BMW 1910 Mercer Runabout 2009 Mercedes Benz 1930 Cadillac V-16 $65 A $95 A $135 L $140 L $160 L $165 A $200 L 205 A The fourth array contains an indicator that specifies whether the car is already rented. At the start of the program, none of the cars is rented. After the user is prompted for the first customer's data, pass the customer's name, car type requested, and the four arrays of data to a method named fulfillRequest(.The method finds the first available car of the correct type, displays its description and rental fee, and changes the rental indicator to show the car is no longer available. If no cars are available of the type requested by the customer, display an appropriate message. The method returns the daily rental fee unless no cars of the correct type are available, in which case the method returns O. The main () method displays the daily rental fee. If a car of the correct type is available, the main( method should pass the daily rental fee, the number of rental days, and the car type requested to a method named calculateContractAmount ). The contract amount is the daily fee times the number of days plus tax. The tax is 6 percent of the rental price for an antique car and 8 percent of the price for a luxury car. The method returns the amount of the contract to the main method, where it is displayed. Before the user is prompted for data for any customer after the first one, determine whether any cars are still available for rent. If no more cars are available, display an appropriate message and end the programStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started