Question: The following code is dealer.c Project 8, Program Design A small car dealer would like to maintain information for the cars in stock. Each car

 The following code is dealer.c Project 8, Program Design A small

The following code is dealer.c

car dealer would like to maintain information for the cars in stock.

Each car was stored with the make and model, color, manufacture year,

Project 8, Program Design A small car dealer would like to maintain information for the cars in stock. Each car was stored with the make and model, color, manufacture year, city mpg, highway mpg, and quantity. The program dealer.c contains the car struct declaration, function prototypes, and the main function. Complete the function definitions so it uses a dynamically allocated linked list to store the cars. The following functions should be completed: 1. append to_list: ask the user to enter a car's make, model, color, manufacture year, city mpg, highway mpg, and quantity (in the exact order), then add the car to the end of the linked ist. It should check whether the car has already existed by make, model, color, and manufacture year. If so, the function should print a message and exit. If the car does not exist, allocate memory for the player, store the data, and append the car to the end of the linked list. If the list is empty, the function should return the pointer to the newly created car. Otherwise, add the car to the end of the linked list and return the pointer to the linked ist. a. b. c. d. 2. find_car: search by make and model, print the car's color, manufacture year, city mpg, highway mpg, and quantity. Print all cars that match the make and model. If the make and model is not found, print a message. printList: print the make, model, and manufacture year, color, city mpg, highway mpg, and quantity of all the cars. clearList: when the user exists the program, all the memory allocated for the linked list should be deallocated. 3. 4. Note: use read_line function included in the program for reading in make, model and color.Grading

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!