Question

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
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 9 more requests to produce the answer.

1 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


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:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

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...

  • You have to write a java solution for a store. Part 1 The solution needs to...

    You have to write a java solution for a store. Part 1 The solution needs to have at least following features: ◦ Item: Name, ID (incremental ID by 1 for each product), Price. ◦ Store Basket: ID (incremental ID by 1 for each basket), Net Amount, Total Amount, VAT, List of items, Date and Time of purchase, Address of the store, name of cashier. ◦ Cashier: Name, Surname, Username and Password (insert from code five fixed cashiers). ◦ Manager: Name,...

  • Python Subject Output in Thonny ot IDLE Description Create a program that keeps track of the...

    Python Subject Output in Thonny ot IDLE Description Create a program that keeps track of the items that a wizard can carry. Sample Output (Your output should be similar to the text in the following box) The Wizard Inventory program COMMAND MENU walk - Walk down the path show - Show all items drop - Drop an item exit - Exit program Command: walk While walking down a path, you see a scroll of uncursing. Do you want to grab...

  • 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...

  • 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....

  • Pop’s Pie Shop wants you to help computerize its ever-changing menu. Here’s an example of the...

    Pop’s Pie Shop wants you to help computerize its ever-changing menu. Here’s an example of the delicious items that Pop’s has to offer: Here is what we are starting with today: Savory: Savory Mince & Cheese Pork & Peach BBQ C urried Lamb & Spinach Chicken & Kumara Smoked Salmon, Leek & Potato Thai Butternut Curry (vegan) Sausage Roll Spinach & Cheese Roll Beef Pasty Sweet Pie by the slice: Banoffee Blueberry Apple (vegan) Buttermilk & Raspberry Chocolate Chess Chocolate...

  • Java program Program: Grade Stats In this program you will create a utility to calculate and...

    Java program Program: Grade Stats In this program you will create a utility to calculate and display various statistics about the grades of a class. In particular, you will read a CSV file (comma separated value) that stores the grades for a class, and then print out various statistics, either for the whole class, individual assignments, or individual students Things you will learn Robustly parsing simple text files Defining your own objects and using them in a program Handling multiple...

  • 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...

  • JAVA Write a program that prompts the user to enter a file name, then opens the...

    JAVA Write a program that prompts the user to enter a file name, then opens the file in text mode and reads it. The input files are assumed to be in CSV format. The input files contain a list of integers on each line separated by commas. The program should read each line, sort the numbers and print the comma separated list of integers on the console. Each sorted list of integers from the same line should be printed together...

  • 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...

ADVERTISEMENT
Free Homework Help 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.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT