Starting from:
$30

$24

CS Assignment#4:Linked Lists Solved

Goal

Create a program that will allow a user to manage the inventory of a grocery store. Gain familiarity with the list ADT.

Introduction

The stock management system for the grocery store will contain the following information for each pro-duct in the inventory:

Product (Product.java):

quantity (number of items in inventory, greater than or equal to 0) price (dollars and cents, greater than 0)

name (may contain spaces in it)

The program should offer the user a menu with the following options:

    1. Print stocked items

    2. Create category

    3. Create Product

    4. Delete Product

    5. Delete Category

    6. Manage Quantity of Item

    7. Get amount of items stocked in multiple categories

    8. Get Total Value of all products in a category

0. Quit

The program should perform the operation selected by number and then re-display the menu. If the operation fails (i.e. attempt to remove an item not in the inventory) your program should display an error message

You are provided with the skeleton source code. You need to implement all the methods (all the TODOs) inside of StockManagementSystem.java and Category.java.

Problem Description

First, carefully read the provided code. You need to implement/complete the following.

StockManagementSystem:

Your StockManagementSystem class is the main class of the program.

public StockManagementSystem(). This is the constructor. You should initialize the list of categories using the provided ArrayList class.

public ListInterface<Category>categories. Variable for holding all the categories. This should be initialized inside the constructor.

1
***You need to implement all the methods described in the provided class (StockManagementSy-stem.java).***

Category:

Your Category class keeps track of the items/products.

public Category(String categoryName). This is the constructor. You should initialize the list of catego-ries using the provided ArrayList class.

private ListInterface<Product>products. Variable for holding all the products. This should be initia-lized inside the constructor.

private String categoryName;. Variable for holding the name of the category. This should be initialized inside the constructor. This should be very useful when you need to search for a specific category.

***You need to implement all the methods described in the provided class (Category.java).***

Hints: You can preload some products in the system as shown in the provided sample output.txt.


Note: Code that cannot be compiled and executed will be given a grade of 0.

Academic Honesty

The work in this assignment is to be done independently. Discussions with other students on the assig-nment should be limited to understanding the statement of the problem. Cheating in any way, including giving your work to someone else will result in an F for the course and a report to the appropriate Uni-versity authority.

What to submit

Upload all your java files (preferably is a .zip) using the website. If you overwrite the provided in-terfaces, remember to restore them to their original versions. All programs will be tested on the com-mand line, so if you use an IDE to develop your program, you must export the java files from the IDE and ensure that they compile and run on the command line. Do not submit the IDE’s project fi-les. Your TA should be able to compile and run your code as discussed in Lab 1. For instance, javac edu/pitt/cs/as4/StockManagementSystem.java and java edu.pitt.cs.as4.StockManagementSystem must com-pile and run StockManagementSystem.

In addition to your code, you may wish to include a README.txt file that describes features of your program that are not working as expected, to assist the TA in grading the portions that do work as expected.

How to submit your assignment

We will use a Web-based assignment submission interface. To submit your assignment:

Go to the class web page http://db.cs.pitt.edu/courses/cs0445/current.term/ and click the Submit button.

Use your pittID/username as the username and your PeopleSoft ID as the password for authentica-tion. There is a reminder service via email if you forgot your PeopleSoft ID.

Upload your assignment file(s) to the appropriate assignment (from the drop-down list).

Check (through the web interface) to verify what is the file size that has been uploaded and make sure it has been submitted in full. It is your responsibility to make sure the assignment was properly submitted.

You must submit your assignment before the due date (8:00 PM, Tuesday, Nov 6, 2019). There are no late submissions.


2

More products