subject

C program You will be writing a program that checks in previously registered classic cars for a car show. Each classic car has a unique tag number. Each owner can register up to three cars.
Your program will define two structures, one for the car owner and one for a car.
The car information is a tag number (e. g. 14123), the year (e. g. 1974), the make (e. g. Chevrolet), the model (e. g. Nova), the color (e. g. Red), and a value for keeping track of whether or not a car was checked in (use 0 for not checked in and 1 for checked in).
The owner information in the structure is the name, phone number (e. g. (313) 867-5309), and an array that can store up to three car tag numbers.
Your main() function will contain an array of 20 cars and will send the array to a loadCars() function that will load the car information from the file registeredCars. csv. (this file has been provided in Moodle). The file contains information in the following format:
tagNumber, year, make, model, color
When you read in the data from the file into the array of classic cars, you will notice that the check in value is not in the data file. Set each car that is read in to a 0, since none of these cars are checked in yet.
Next, your main() function will call a getCheckInInfo() function that will ask the user for the owners name, phone number, and the total number of car tags that he is checking in. The number of cars being checked in must at least be 1 and can be no more than 3. This data must be validated. Once validated all of this information (the name, phone number and the number of car tags) must be returned back to main().
Once you have asked for the owner information, assign the name and phone number to a single owner structure. Still using the owner structure, assign zeros to the values in the array for the car tag numbers. You will NOT be creating an array of owners! Just declare and use one owner structure variable.
Next, using a loop, ask the user for each of the car tag values. You are using a loop that will ask for the value of the car tag, validate it by sending it to a validateCar() function, and then assign it to the correct spot in the car tag numbers array within your owner structure.
The validateCar() function will accept a car tag and the classic cars array as parameters. This function will use a loop to go through the entire array checking to see if it can find the car tag. If a car tag is found, you will first change the checked in value to 1 and return a 1. If you get through the entire array and do not find the tag, then you must return a 0.
Your main() function will then call a function called printRegistrationInvoice() that will accept the car owner structure, the classic cars array, and the number of car tags the owner is checking in and return the total collected.
The printRegistrationInvoice() accepts the car owner structure, the classic cars array, and the number of car tags the owner is checking in. This function will print the owners name and phone number and the information for the cars. You will use the car tag number that are in the owner structure and compare them to the cars in the classic car array. When you match one of the three possible cars, print the data in the following format:
Tag number: year color make model
(e. g. 14608: 1968 Black Chevrolet Camaro)
The printRegistrationInvoice() function will also print and return the total registration amount due based on the following schedule:
1 car $ 55.00
2 cars $ 85.00
3 cars $100.00
You will know how many cars that they have based on the number of car tags that the owner said they were checking in.
The main() function will keep track of both the total amount collected (from the printRegistrationInvoice() function) and the total number of cars checked in (from the number of car tags for each owner). Ask if there is another owner to register and continue registering owners until there are no more to register.
Once all of the owners have registered, print the total collected and the total cars checked in.
Lastly, your main() function will send the classic cars array to a printReport() function.
The printReport() function will accept the classic cars array as a parameter and print a report file (.txt) that ONLY prints the cars that have NOT been checked in. You will know this based on the value of the check in for each car.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:00, terriblexsiren
You receive an email from an impressive-sounding stranger, professor alexander rothschild renard iii, president of the american institute for scientific political statesmen. he urges you to vote for his presidential candidate choice. this social media red flag is known as
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, lyn94
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
image
Computers and Technology, 24.06.2019 02:00, arubright177
Write an expression that will cause the following code to print "equal" if the value of sensorreading is "close enough" to targetvalue. otherwise, print "not equal". ex: if targetvalue is 0.3333 and sensorreading is (1.0/3.0), output is:
Answers: 1
image
Computers and Technology, 24.06.2019 16:00, bsrlee1115
Which type of cloud computing offers easily accessible software and applications on the machines
Answers: 1
You know the right answer?
C program You will be writing a program that checks in previously registered classic cars for a ca...

Questions in other subjects:

Konu
English, 14.12.2020 22:40