Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C programming a) Consider a car showroom Proton Cars in Gambang which sells new cars. The showroom deals with customers daily to sell the cars
C programming
a) Consider a car showroom "Proton Cars" in Gambang which sells new cars. The showroom deals with customers daily to sell the cars and deal with Proton's company to bring the new cars. The showroom makes a review of the sell every day based on car number. Suppose that the car id number is an integer value and the showroom wants you to develop a complete program using linked-list to register and remove the record of cars based on their id. Therefore, you need to: i. Develop a linked list structure of car (2 Marks) ii. Develop two functions add_begin(int) and add_middle (int, int)to add car ID at the beginning and in the middle of the linked list, respectively (9 Marks) Develop function myremove(int) to delete the car id at any place of the linked list (6 Marks) iv. Develop function disp() to display current car ID in the linked list (3 Marks) V. O o Based on the functions developed in ii), iii), and iv), construct a main program to execute the following: Insert three records of car ID at the beginning which are 1004, 1002, and 1006 Insert two new records of car ID which are 1003 and 1007 after car ID 1004 and 1002, respectively Delete two record of car ID which are 1002 and 1007 Display the current car ID in the linked list (5 Marks) a) Consider a car showroom "Proton Cars" in Gambang which sells new cars. The showroom deals with customers daily to sell the cars and deal with Proton's company to bring the new cars. The showroom makes a review of the sell every day based on car number. Suppose that the car id number is an integer value and the showroom wants you to develop a complete program using linked-list to register and remove the record of cars based on their id. Therefore, you need to: i. Develop a linked list structure of car (2 Marks) ii. Develop two functions add_begin(int) and add_middle (int, int)to add car ID at the beginning and in the middle of the linked list, respectively (9 Marks) Develop function myremove(int) to delete the car id at any place of the linked list (6 Marks) iv. Develop function disp() to display current car ID in the linked list (3 Marks) V. O o Based on the functions developed in ii), iii), and iv), construct a main program to execute the following: Insert three records of car ID at the beginning which are 1004, 1002, and 1006 Insert two new records of car ID which are 1003 and 1007 after car ID 1004 and 1002, respectively Delete two record of car ID which are 1002 and 1007 Display the current car ID in the linked listStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started