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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Which of the following includes the three primary network access technologies? dsl, cable modem, broadband lan, wan, man voip, uc, iptv tcp/ip, ftp, dhcp
Answers: 2
question
Computers and Technology, 25.06.2019 07:50
Identify an advantage of centralized processing
Answers: 1
question
Computers and Technology, 25.06.2019 19:00
What a suitable variable name to store the number of years old a person is
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
question
Mathematics, 12.12.2019 15:31
question
Mathematics, 12.12.2019 15:31
Questions on the website: 13722363