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

Only Pseudocode!!!!!!! No Java or other languages plz i dont under stand how you

ID: 3603875 • Letter: O

Question

Only Pseudocode!!!!!!! No Java or other languages plz

i dont under stand how you need more info.........This is all the info I have, this problem is dealing with arrays from chapter 6 from the book programming logic and design.

1.) "A rental car company requires a car return program that allows works as follows:"

a. Assumes a maximum of 500 rentals, i.e., it is possible to have fewer than 500

rentals, just not more than that number.

b. The program must allow an employee to enter:

i. The rental ID, e.g., “EL101”

ii. The beginning odometer reading noted on the rental contract

iii. The ending odometer reading from the car

iv. The base rental charge that the customer has paid when renting the vehicle

c. The program must allow the user to continuously enter this input, but allow

them to stop by entering “ZZ999” for the rental ID.

d. For each customer, the program must calculate and output the additional

amount owed, if any, which is determined as follows:

i. All customers are allowed 500 miles as part of the base rental charge

ii. For up to 150 miles over the allowed 500, the customer has to pay an additional $2 per mile

iii. For any excess beyond 150 miles, the customer must pay $3 per mile

iv. A tax of 6.5% is applied on the calculated amount – output the amount before tax, the dollar amount of the tax itself, and the total after tax

e. When the user stops data entry, the program must determine and output:

i. The most miles driven by a customer, and output that along with the rental ID

ii. The least miles driven and output that along with the rental ID

iii. The total additional amount collected from customers

iv. The average amount collected from customers

v. The total revenue from rentals, which would include both the base rental

charges and the additional amounts collected

f. The program must also allow the user to enter a rental ID, then search for that

ID and if it is found, display all information pertaining to that rental – the ID,

odometer readings, base rental charge, additional amounts before and after tax,

and the tax itself, all in the correct order as you would expect to see on a bill or statement

Here are some of examples of the chapter 6

Next example

Chapter 6 ExamplespdTX + 1 of 7 Programming Exercise 1, page 267 Design the logie for a program that allows a user to enter 12 numbers, then displays them in the reverse order of their entry a. Answer: start Declarations Declare a constant for the size of the array num count num index num MAX num numbers [MAX NUMBERS] . 0,0,0,0,0,0,0,0 -12 Declare the array. fill it with zeroes output "elcome to the Reverser." output ”This program will accept a set of ", MAX NUMBERS numbers and display them in reverse order of entry" Set count to zero, which accomplishes two things I. Set our ruming count of spots in the array that have currently been used to zero (we have not used any spots yet) The count variable will also be used to keep track of which array index we will be using next. Right now, since we have yet to store anything in the array, we are at index zero. count0 2. Type here to search

Explanation / Answer

Declarations:
MAX_ENTRIES = 500

Structure car_rental:
   rental_id
   start_odometer
   end_odometer
   base_amount
   additional_amount
   total_amount_before_tax
   total_amount_after tax

car_rental data[MAX_ENTRIES]

rental_id
st_odometer
ed_odometer
base_rental

max_distance = 0
min_ditance = 500000 (Some large value)
total_additional_amount = 0
total_base_amount = 0
total_revenue = 0
while count < MAX_ENTRIES
     input data[count].rental_id , data[count].st_odometer, data[count].ed_odometer , data[count].base_rental
     if rental_id == "ZZ999"
       break
     dist = data[count].ed_odometer - data[count].st_odometer
     if (dist > max_dist)
        max_dist = dist
     if (dist < min_dist)
        min_dist = dist
     if (dist > 650)
         data[count].additional_amount = (dist - 650) * 3 + 150 * 2
     if (dist <= 650 and dist > 500)
         data[count].additional_amount = (dist - 500) * 2
     if (dist <= 500)
         data[count].additional_amount = 0
     data[count].total_amount_before_tax = data[count].additional_amount + data[count].base_rental
     data[count].total_amount_after_tax = data[count].total_amount_before_tax + data[count].total_amount_before_tax * 0.065
     total_base_amount = total_base_amount + data[count].base_rental
     total_revenue = total_revenue + data[count].total_amount_before_tax
     count++

output max_dist, min_dist, total_additional_amount, total_base_amount/count, total_revenue

input rental_id for search
found = 0
for looping i to count
    if data[i].rental_Id == rentals_id)
        display the information
        found = 1

if (found == 0)
   output "Not Found"