Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your job is to write a C program that implements a simple car rental information system. Your program keeps track of the cars of a

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Your job is to write a C program that implements a simple car rental information system. Your program keeps track of the cars of a rental company and rental information. The program provides a simple user interface to add cars to the company's inventory, to make a car reservation, find a reservation, print rented and non-rented vehicles, and compute average number of days rented. Your program must use the data types and variables described below. A type definition of a new structure named Car to store car information. This structure must have the following fields: int carId; I a unique ID of a car char make [20 // make of the car char model[20] // model of the car int numDoors; / 2 or 4 door cars double rate; // the rental rate of the car A type definition of a new structure named Rental to store rental information of a renter char renterName [20]; I/ name of renter int daysRenting; I/ days renting the car int carId; // ID of the car rented Two arrays in main0 function that store car information and rental information Car allcars[20]; I/ a list of cars Rental allRentals[60]; / a list of rentals Note that there can be more rentals than cars. This is because we may consider allRentals to store records about cars currently rented and those that have been reserved although the rental period is not captured in this simple program. The program keeps track of the total number of cars owned by the company and the total number of rentals by the following two variables declared in main0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Influxdb Database A Comprehensive Guide To Learn Influxdb Database

Authors: Cybellium Ltd ,Kris Hermans

1st Edition

B0CNGGWL7B, 979-8867766450

More Books

Students also viewed these Databases questions