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

1. Cost Is No Object is a car rental service that specializes in lending antique

ID: 3623545 • Letter: 1

Question

1. Cost Is No Object is a car rental service that specializes in lending antique and luxury cars to clients on a short-term basis. A typical customer might rent a vintage convertible to transport out-of-town clients to a business meeting, or rent a luxury car to transport a wedding party. The service currently has three employees and 10 vehicles that it rents. List the entities, attributes, and relationships needed to write a program that could simulate one day’s business activity.

2. In Chapter 1, you thought about the objects needed for 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. One required application is a program that calculates customer bills. This month, cars are being rented for $35 per day, with a 9% tax applied. Fill in the blanks for the missing pseudocode for a program that accepts a client’s name, the type of car the client wants to rent, and the number of rental days needed. Output the client’s bill, including the name, type of car, number of days, total due before tax, tax, and total due with tax.

class RentalCarBill
­­main()
// Declarations
________ customerName
________ numberOfDays
________ carType
________ tax
________ billSubtotal
________ totalBill
________ RENTAL_RATE = 35
________ TAX_RATE = 0.09
output “Enter the customer’s name >> ”
input customerName
output “What type of car does ”, customerName,
“ wish to rent? >>”
input carType
output “How many days is the ”, carType,
“ car needed? >>”
input numberOfDays
billSubtotal = ______________ * ______________
_________ = billSubtotal * TAX_RATE
totalBill = ________ + __________
output “Name: ”, customerName
output “Type of car: ”, carType
output “Number of days: ”, numberOfDays
output “Subtotal (before tax): ”, billSubtotal
output “Tax due: ”, tax
output “Total bill: ”, totalBill
return
endClass

Explanation / Answer

please rate - thanks

class RentalCarBill
­­main()
// Declarations
__string______ customerName
___int_____ numberOfDays
__string_____ carType
__real______ tax
_real_______ billSubtotal
___real_____ totalBill
_int_______ RENTAL_RATE = 35
_real_______ TAX_RATE = 0.09
output “Enter the customer’s name >> ”
input customerName
output “What type of car does ”, customerName,
“ wish to rent? >>”
input carType
output “How many days is the ”, carType,
“ car needed? >>”
input numberOfDays
billSubtotal = ___numberOfDays___________ * ____RENTAL_RATE__________
__tax_______ = billSubtotal * TAX_RATE
totalBill = ___tax_____ + __billSubtotal________
output “Name: ”, customerName
output “Type of car: ”, carType
output “Number of days: ”, numberOfDays
output “Subtotal (before tax): ”, billSubtotal
output “Tax due: ”, tax
output “Total bill: ”, totalBill
return
endClass