Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Insert Table Chart Text Shape Media Comment Description: For this assignment, you are going to write an ordered linked list to implement a grocery list.

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Insert Table Chart Text Shape Media Comment Description: For this assignment, you are going to write an ordered linked list to implement a grocery list. You will ask the user for information and modify the list as the user indicates. All of the information will be written to a file. Just as in the first program, you are to check to see if the file exists. If it does, open the file and populate the list. When the program terminates, print the information to a file. Call the file grocerylist.txt.The first entry in the list is to be the number in the list. You will modify the Node class that you wrote in the last program. You will create a structure that contains the main data and the Node class will contain a variable of that structure and the link. You will write an ordered link list class that will insert, delete, traverse, and retrieve items from the list. The list will be ordered on the UPC code. You will not enter duplicate items. If the item already exists, then you need to indicate that to the user and not enter it in the list. Structure data: UPC code-number of the item ltem description - description of item that must be able to include spaces Quantity-number of item to purchase Cost-cost per item Aisle -number of aisle at store Node class data: Structure - will be a declaration of the structure defined above - the information of the structure must be private to the class, but can be returned from the class. Link-pointer to next item in the list Node class member functions Default constructor Constructor that takes UPC, item, quantity, cost, and aisle Mutator function to set next pointer Accessor function to return next pointer Accessor function to return UPC code

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_2

Step: 3

blur-text-image_3

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago