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

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago

Question

1. Identify outcomes (e.g., quality, accidents).

Answered: 1 week ago