Homework Help Question & Answers

Java Inventory Management Code Question

Inventory Management

Objectives:

  • Use inheritance to create base and child classes

  • Utilize multiple classes in the same program

  • Perform standard input validation

  • Implement a solution that uses polymorphism


Problem:

A small electronics company has hired you to write an application to manage their inventory. The company requested a role-based access control (RBAC) to increase the security around using the new application. The company also requested that the application menu must be flexible enough to allow adding new menu items to the menu with minimal changes. This includes re-ordering the menu items and making changes to the description of a menu item without having to change the code.

Security:

The company has suggested to start the application by prompting the user for a username and password to authenticate the user. There are two types of users at this company, managers and employees. If managers log on to the application, they will see all options on the menu list. If employees log on to the application, they will see a limited set of options on the menu list. User information is stored in Users.dat file, which may or may not exist at the start of the program. A super user “admin” with password “admin” has already been hardcoded in the program to allow for the initial setup and the creation of other users. The Users.dat file contains the FirstName, LastName, Username (case insensitive), HashedPassword and a flag to indicate whether a user is a manager or not. The file is comma separated and it is formatted as follows:

7.2 inventory cs 2336.PNG

Note: Ensure that the 'AddUser' function does not add duplicate values, and the 'ChangePassword' function does not change password if username/password is entered incorrectly. If adding a new user or changing the password is successful, return true, or else return false.

Application Menu:

The menu of the application is dynamically loaded and displayed to the user only after the user successfully logs on. The menu items will be loaded from file “MenuList.dat”, which may or may not exist at the start of the application. If the file doesn’t exist, the application should show at least an Exit menu item as default. The file will contain all menu items details, including the name of the command that will be executed when the menu item is selected. If a menu item is marked as restricted (Boolean flag), only managers can see that item. The file contains the following comma separated fields, Description, a Boolean flag to indicate if the option is restricted to managers only, and the name of the menu command that will be executed when the option is chosen. The order and option number of a menu item may change depending on how they are listed in the file. The Exit option will always be listed last and it will not be in the file.

Below is a sample of how the MenuList.dat file looks like:

7.2 inventory cs 2336 part 2.PNG

Note: The command name of each menu item must match the name of the class that you will create in the code (See AddProductCommand class in the code for example).

Inventory:

The inventory consists of multiple products of type Product stored in class ProductCatalog. The ProductCatalog is responsible of all inventory operations that add, remove, find and update a product. When printing a product information, the product retail price should be calculated and displayed as well. Retail price = (cost + (margin * cost/100)). A list of functions has been added to this class in the provided code template. You must implement all listed functions. The inventory products will be saved in file Inventory.dat, which may or may not exist when the program first starts. The file will contain the product unique id (int), product name (string), cost (double), quantity (int) and margin (int, integer that represents margin percentage).

The Inventory.dat file is comma separated and formatted as follows:

7.2 inventory cs 2336 part 3.PNG

Flow:

  • Program starts in main() method

  • Prompt user for username and password

  • Authenticate user and maintain the logged-on user object

  • Load inventory

  • Load and create menu list

  • Display menu list and prompt the user for option

  • Execute selected option

  • Keep displaying the menu until the user chooses to exit


Output Format:

7.2 inventory cs 2336 output.PNG

InventoryManagement (1).zip

The code is attached above in a zip file.

0 0
Next > < Previous
Answer

This Homework Help Question: "Java Inventory Management Code Question" No answers yet.

Be the First!

Request Answer

Request answer!

We need 9 more requests to produce the answer to this homework help question. Share with your friends to get the answer faster!

1 /10 have requested the answer to this homework help question.

Request! (Login Required) Share with friends


Once 10 people have made a request, the answer to this question will be available in 1-2 days.
All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Java Inventory Management Code Question
Your Answer: Your Name: What's your source?
Similar Homework Help Questions
  • InventoryManagement

    Problem:A small electronics company has hired you to write an application to manage their inventory. The company requested a role-based access control (RBAC) to increase the security around using the new application. The company also requested that the application menu must be flexible enough to allow adding new menu items to the menu with minimal changes. This includes re-ordering the menu items and making changes to the description of a menu item without having to change the code.Security:The company has...

  • Lab 4: Databased Admin Tool Continued Python Objective: In the previous lab, you developed an admin tool for username an...

    Lab 4: Databased Admin Tool Continued Python Objective: In the previous lab, you developed an admin tool for username and password management. You accomplished the tasks with Dictionary or List. Here, use class to design your own data structure to accomplish a similar task. The UD.txt datafile: FIRST NAME, LAST NAME,USERNAME,PASSWORD Sam, DDal,sdd233,Pad231 Dave, Dcon,dcf987, BHYW4fw Dell, Grant,dgr803,Sb83d2d Mike, Kress,mkr212,UNNHS322 Lisa,Kate,lki065,dgw6234 Paul,Edward,ped332,9891ds Youyou,Tranten,ytr876,dsid21kk Nomi,Mhanken,nmh223,3282jd3d2 Write a program that imports the database from UD.txt, your program can search for users’ password....

  • need help in Java Now we’ll continue our project by writing a Facebook class that contains an ArrayList of Facebook user...

    need help in Java Now we’ll continue our project by writing a Facebook class that contains an ArrayList of Facebook user objects. The Facebook class should have methods to list all of the users (i.e. print out their usernames), add a user,delete a user, and get the password hint for a user You will also need to create a driver program. The driver should create an instance of the Facebook class and display a menu containing five options: list users...

  • Java Code

    Wings Coffee ShopA local coffee shop sells a variety of different items shown below to their customers. You are asked to write a Java application that can be used to keep track ofthese items. Additionally, this program provides a way to print out a listing of the items.Item Name Price Coffee$1.00 Water$2.00 Milk$1.50 Bagel$1.25 Donut$0.75Your program will create a class, named Item. This class has the following: * A String instance variable to hold the item name * A double...

  • I need 5-9 This is for an Intro to Linux/Unix Using PSFTP to download files from to the server Some activities ask you t...

    I need 5-9 This is for an Intro to Linux/Unix Using PSFTP to download files from to the server Some activities ask you to download a file from the server to your computer. Before you download the file from the server you will also have to convert it to ASCII (DOS/WINDOWS). Here are the steps. Login to the server Crete your file using vi You can check your file type with the file command to see what the type information...

  • Create a JAVA program for a Kiosk management system. A local kiosk in your neighborhood has...

    Create a JAVA program for a Kiosk management system. A local kiosk in your neighborhood has been heavily challenged by the manual system currently used to manage the kiosk’s day to day operations. The kiosk management have been informed of your newly acquired knowledge in application development and have approached you to create an electronic management system. The system is meant to help the Kiosk in managing its stock and finances; with this in mind your application should then offer...

  • Banking System (Java Programming) 1 bank (Bank) has 5 accounts holder (Account) also designing te...

    Banking System (Java Programming) 1 bank (Bank) has 5 accounts holder (Account) also designing textbased menu (switch case): Main Menu: 1. Admin Login 2. User Login 3. Exit Admin Menu: 1. Add an Account 2. Remove an Account 3. Print total balance 4. Print total balance per city 5. Go back to main menu User Login 1. Withdraw //also redo last withdraw 2. Deposit //also redo last deposit 3. print account 4. Go back to main menu Designing class Account...

  • Java Programming Joyce Farrell 5th Edition Chapter 5 Exercise 9.

    In my java class this is the problem I am given: Write an application that displays a menu of three items in a restaurant as follows:(1)Cheesburger 4.99(2)Pepsi 2.00(3)Chips 0.75Prompt the user to choose an item using the number(1,2 or 3) that corresponds to the item, or to enter 0 to quit the application. After the user makes the firstselection,if the choice is 0,display a bill of $0. Otherwise, display the menu again. The user should respond to this prompt with...

  • Lab 3: Databased Admin Tool Python Objective: Develop an admin tool for username and password management. You will need...

    Lab 3: Databased Admin Tool Python Objective: Develop an admin tool for username and password management. You will need to use the best data structure to store the data you read from UD.txt for efficient processing. You can accomplish these tasks with Dictionary or List. The data file (UD.txt) : FIRST NAME, LAST NAME,USERNAME,PASSWORD Sam, DDal,sdd233,Pad231 Dave,Dcon,dcf987, BHYW4fw Dell,Grant,dgr803,Sb83d2d Mike,Kress,mkr212,UNNHS322 Lisa,Kate,lki065,dgw6234 Paul,Edward,ped332,9891ds Youyou,Tranten,ytr876,dsid21kk Nomi,Mhanken,nmh223,3282jd3d2 Write a program that imports the database from UD.txt Give the following options: A: Search by...

  • JAVA PROGRAMMING - MORSE CODE

    Program Description: A Java program is to be created to produce Morse code. The Morse code assigns aseries of dots and dashes to each letter of the alphabet, each digit, and a few special characters (such asperiod, comma, colon, and semicolon). In sound-oriented systems, the dot represents a short sound and thedash represents a long sound. Separation between words is indicated by a space, or, quite simply, theabsence of a dot or dash. In a sound-oriented system, a space is...

Free Homework App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.