Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework Assignment #3 Data Structures COMP 4700 For the following questions, you will implement the data structure to store information used by a local car

image text in transcribed
image text in transcribed
Homework Assignment #3 Data Structures COMP 4700 For the following questions, you will implement the data structure to store information used by a local car dealer. Each car has some information and stored in a text files called cars: Write a main program for all questions to let the user enter, delete, search for information, and print current cars stored in the data structure. Cars.txt formatted so car records separated by a blank line. Each record contains (in order, each in a single line): ID, Make (manufacturer), Model, Year, Mileage, Price. For each question below, write a driver main method to test your implementation. Use ID as a key to search or delete in your methods. Q1) (25 points) Implement a double linked-list to store cars data. Write a double linked-list class including search, delete, append (to the head and tail), and remove (from the head and tail). 02) (25 points) Implement a LIFO stack of car data using a linked-list. 03) (25 points) Implement a min-heap of cars data that can extract the car with the lowest price. Write a min-heap class including heapify, build heap, extract, and insertion. Q4) (25 points) Implement a binary search tree of car data. Write a BST class including search, insertion, and deletion. Instructions: 1. All of the work should be submitted as a softcopy. No hardcopy will be accepted. 2. Source codes should be stored in separate folders for each question and all compressed into one file. Each question in a separate program. Include the executable file as well. 3. Questions should be submitted in one compressed file. 4. Include screen shots of the execution of your code for each question. Homework Assignment #3 Data Structures COMP 4700 For the following questions, you will implement the data structure to store information used by a local car dealer. Each car has some information and stored in a text files called cars: Write a main program for all questions to let the user enter, delete, search for information, and print current cars stored in the data structure. Cars.txt formatted so car records separated by a blank line. Each record contains (in order, each in a single line): ID, Make (manufacturer), Model, Year, Mileage, Price. For each question below, write a driver main method to test your implementation. Use ID as a key to search or delete in your methods. Q1) (25 points) Implement a double linked-list to store cars data. Write a double linked-list class including search, delete, append (to the head and tail), and remove (from the head and tail). 02) (25 points) Implement a LIFO stack of car data using a linked-list. 03) (25 points) Implement a min-heap of cars data that can extract the car with the lowest price. Write a min-heap class including heapify, build heap, extract, and insertion. Q4) (25 points) Implement a binary search tree of car data. Write a BST class including search, insertion, and deletion. Instructions: 1. All of the work should be submitted as a softcopy. No hardcopy will be accepted. 2. Source codes should be stored in separate folders for each question and all compressed into one file. Each question in a separate program. Include the executable file as well. 3. Questions should be submitted in one compressed file. 4. Include screen shots of the execution of your code for each

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Accounting

Authors: W. Steven Albrecht, James D. Stice, Earl Kay Stice, K. Fred Skousen, Albrecht S.E.

8th Edition

0324066708, 978-0324066708

More Books

Students also viewed these Accounting questions

Question

Explain why values of sin increase as increases from 0 to 90.

Answered: 1 week ago