Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Review: Full, Anonymous: No Using Methods In earlier chapters, you have develope

ID: 3624487 • Letter: R

Question

Review: Full, Anonymous: No

Using Methods

In earlier chapters, you have developed programs for Cost Is No Object—a car rental service that specializes in lending antique and luxury cars to clients on a short-term basis. 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.

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 $65 A
1922 Ford Model T $95 A
2008 Lincoln Continental $135 L
2002 Lexus $140 L
2007 BMW $160 L
1910 Mercer Runabout $165 A
2009 Mercedes Benz $200 L
1930 Cadillac V-16 $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.


1.string DESC[LENGTH] = “­__________”,
“__________”,
“__________”,
“__________”,
“__________”,
“__________”,
“__________”,
“__________”
2. num FEES[LENGTH] = ___, ____, ____, ____, ____,
____, ____, ____
3.string CODE[LENGTH] = “___”, “___”, “___”, “___”, “___”,
“___”, “___”, “___
4.num is_rented[LENGTH] = _

Explanation / Answer

int LENGTH = 8; 1.string *DESC[LENGTH] ={"1967 Ford Mustang","1922 Ford Model","2008 Lincoln Continental","2002 Lexus","2007 BMW","1910 Mercer Runabout","2009 Mercedes Benz","1930 Cadillac"}; 2. num FEES[LENGTH] = {65,95,135,140,160,165,200,205}; 3.string CODE[LENGTH] = {"A","A","L","L","L","A","L","A"}; 4.num is_rented[LENGTH] = {0,0,0,0,0,0,0,0};

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote