Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Programming Language Expert

1. a) Define a user-defined data type (struct) called Car to represent a car in the context of a car dealership database. Car should have at least the following characteristics:

Make
Model
Year
Vehicle Identification Number (VIN)
Color

You would require to decide on appropriate data types of each of the above characteristics.

i) prepare the function called createAndInitializeCar which dynamically allocates memory for the Car object, populates it with values based on user input and returns a pointer to the newly created object.

ii) prepare the function called printCarDetails which takes a Car and prints out its details in the readable format.

iv) prepare the function called changeCarColor which takes a Car and a color as parameters and changes the color of the given car to the given color.

b) Create the user-defined data structure (struct) known as Node which represents a node within the linked list where the “data” stored in each node is a pointer to a Car object.

i) prepare function called insertCarIntoList which takes creates the new Car (using the createAndInitializeCar function) and inserts it at the end of a given linked list of cars.

ii) prepare the function called deleteCarFromList which takes a VIN and deletes Car in a given list that has the given VIN. If the car with the given VIN is not found in the given list, display the appropriate message to the user.

iii) prepare a “main” function which defines external pointer to point to the beginning of a linked list of cars and repeatedly calls insertCarIntoList as long as the user wishes to continue to insert new nodes into the list pointed to by the external pointer. Once the user is done inserting nodes, ask the user to enter a VIN and then call deleteCarFromList function to delete Car with VIN from the list created above.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9725

Have any Question? 


Related Questions in Programming Language

Suppose that we implement the functions of figure using a

Suppose that we implement the functions of Figure using a display. Show the display at the moment the first call to fib0(1) is about to return. Also, indicate the saved display entry in each of the activation records on ...

Create a class rectangle with attributes length and width

Create a class Rectangle with attributes length and width, each of which defaults to 1. Provide methods that calculate the rectangle's perimeter and area. It has set and get methods for both length and width. The set met ...

Sum of digits in a string design a program that asks the

Sum of Digits in a String Design a program that asks the user to enter a string containing a series of single digit numbers with nothing seperating them. The program should display the sum of all the single digit numbers ...

Programming project assessmentinstructions the following

Programming Project Assessment Instructions: The following programming problem can be solved by a program that uses three basic tasks-Input Data, Process Data, and Output Results. To process the data, use file, looping, ...

Question 1 batteriesi want to use a galvanic cell to power

Question 1: Batteries I want to use a galvanic cell to power a 60-watt light bulb. Complete the following steps to determine how long the galvanic cell will power the light bulb before running out. a.) The galvanic cell ...

A theater-seating chart is implemented as a two-dimensional

A theater-seating chart is implemented as a two-dimensional array of ticket prices, like this: ROW 6: 10 10 10 10 10 10 10 10 10 10 ROW 5: 10 10 10 20 20 20 20 10 10 10 ROW 4: 20 20 20 20 20 20 20 20 20 20 ROW 3: 20 20 3 ...

James wants to buy a motorcycleinstructions the following

James wants to buy a motorcycle Instructions: The following programming problem can be solved by a program that performs three basic tasks-Input Data, Process Data, and Output Results. Use RAPTOR to design a suitable pro ...

A local zoo wants to keep track of how many pounds of food

A local zoo wants to keep track of how many pounds of food each of its three monkeys eats each day during a typical week. Write a program that stores this information in a two dimensional 3 × 7 array, where each row repr ...

Programming taskswhile working on the tasks below you are

Programming tasks While working on the tasks below, you are free to request assistance on D2L at: Communications / Discussions / Assignments (or other appropriate sub-topic) These tasks entail modifying your prior code f ...

Suppose a basic block is formed from the c assignment

Suppose a basic block is formed from the C assignment statements x = a + b + c + d + e + f; y = a + c + e; a) Give the three-address statements (only one addition per statement) for this block. b) Use the associative and ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen