Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Java program

12/10/2020 Client: mark2106 Deadline: 3 days

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:


Joe, Last, jlast, 58c536ed8facc2c2a293a18a48e3e120, true

Sam, sone, samsone, 2c2a293a18a48e3e12058c536ed8facc, false

Jane, Best, jbest, 293a18a48e3e12052058c536ed8facc2c, false


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:


Add User, true, AddUserCommand

Delete User, true, DeleteUserCommand

Change Password, false, ChangePasswordCommand

Add New Product, true, AddProductCommand


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:


3424, Smart Watch, 20.45, 23, 80

65454, Flat Screen TV, 465.98, 15, 35

435, Computer Monitor, 123.54, 84, 43


Program 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:


Enter username: some username

Enter password: some password //Repeat prompts until user is authenticated OR show error and

option to exit.

Invalid username or password!

Press enter to continue or “Exit” to exit:

Enter username: some username

Enter password: some password

Welcome Firstname LastName!

Inventory Management System Menu //This is the header of the MenuList



// The order and option number of a menu item may change depending on how they are listed in the MenuList.dat file. The Exit option will always be listed last and it will not be in the MenuList.dat file.



1- Add user

2- Remove user

3- Change password

4- Add new product

5- Update product information

6- Delete product

7- Display product information

8- Display inventory

9- Exit

Enter your selection: 7

Enter product name: sMaRt wAtCh



Id Name Cost Quantity Retail

----------------------------------------------------

3424 Smart Watch $20.45 23 $36.81



//Repeat the menu after each command is executed


Unit Testing:


A unit test method is required to test each of the methods listed below. These methods will be used by the unit testing framework to test the accuracy of your code.



  • InventoryManagementSecurity.AuthenticateUser

  • InventoryManagementSecurity.AddNewUser

  • InventoryManagementSecurity.RemoveUser

  • InventoryManagementSecurity.ChangePassword

  • MenuList.AddMenuItem()

  • ProductCatalog.AddUpdateProduct(Product product)

  • ProductCatalog.RemoveProduct(int productId)

  • ProductCatalog.FindProduct(int productId)

  • ProductCatalog.PrintProductInformation(int productId)

  • ProductCatalog.PrintInventoryList()


Grading:



  • Coding standards, style and comments (10 Points)

  • Unit testing methods x 10, (2 points for each of the methods mentioned above - 20 Points)

  • The rest of the grade will be broken down as follows:

  • InventoryManagementSecurity.AuthenticateUser (5 Points)

  • InventoryManagementSecurity.AddNewUser (5 Points)

  • InventoryManagementSecurity.RemoveUser (5 Points)

  • InventoryManagementSecurity.ChangePassword (5 Points)

  • MenuList.AddMenuItem() (20 Points) //This includes implementing all commands for the menu list

  • ProductCatalog.AddUpdateProduct(Product product) (10 Points)

  • ProductCatalog.RemoveProduct(int productId) (5 Points)

  • ProductCatalog.FindProduct(int productId) (5 Points)

  • ProductCatalog.PrintProductInformation(int productId) (5 Points)

  • ProductCatalog.PrintInventoryList() (5 Points)


Notes:



  • The “InventoryManagement” Maven solution zip file has been provided to you in eLearning.

  • All *.dat files are assumed to be local to the current executable.

  • Do not change the methods stubs or constructors in the template. If in doubt, please ask.

  • Your program is expected to have basic input validation.

  • You may use ArrayList in this project

  • Part 1 deliverables: Unit Test methods + AuthenticateUser() function (no add or remove user is required in part 1). See eLearning for due date.

  • Part 2 deliverables: Functioning program including the Unit Test methods

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Top Writing Guru
Quality Homework Helper
Buy Coursework Help
Online Assignment Help
Custom Coursework Service
University Coursework Help
Writer Writer Name Offer Chat
Top Writing Guru

ONLINE

Top Writing Guru

I am an Academic writer with 10 years of experience. As an Academic writer, my aim is to generate unique content without Plagiarism as per the client’s requirements.

$110 Chat With Writer
Quality Homework Helper

ONLINE

Quality Homework Helper

Hi dear, I am ready to do your homework in a reasonable price.

$112 Chat With Writer
Buy Coursework Help

ONLINE

Buy Coursework Help

Hi dear, I am ready to do your homework in a reasonable price.

$112 Chat With Writer
Online Assignment Help

ONLINE

Online Assignment Help

Hi dear, I am ready to do your homework in a reasonable price.

$105 Chat With Writer
Custom Coursework Service

ONLINE

Custom Coursework Service

Hey, Hope you are doing great :) I have read your project description. I am a high qualified writer. I will surely assist you in writing paper in which i will be explaining and analyzing the formulation and implementation of the strategy of Nestle. I will cover all the points which you have mentioned in your project details. I have a clear idea of what you are looking for. The work will be done according to your expectations. I will provide you Turnitin report as well to check the similarity. I am familiar with APA, MLA, Harvard, Chicago and Turabian referencing styles. I have more than 5 years’ experience in technical and academic writing. Please message me to discuss further details. I will be glad to assist you out.

$105 Chat With Writer
University Coursework Help

ONLINE

University Coursework Help

Hi dear, I am ready to do your homework in a reasonable price.

$112 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Holes vocabulary chapters 11 20 - Birches by robert frost explanation - Friend or foe book review - Advanced higher music course specification - Why was catcher in the rye banned - Suttle and king pyramid scheme - 631wk4d2 - Lord mayor disaster relief fund - Compare and contrast servant leadership and followership - North berwick high school - Hard rock cafe vision statement - Time Value of Money - LIRN PAPER - Film review - Prices perform a rationing function by - Paper writing - A7 Blood pressure in children - Ncsbn pearson vue login - Internal parts of a squid - 2 responses Aug 06 - Module 03 Quiz - Management leading and collaborating in a competitive world pdf 3 3 30 www.homeworkmarket.com/files/management-leading-collaborating-in-a-competitive-world-13th-edition-b078stlp98-pdf-486 4477 Dec 10 - List of printmaking artists - Essay - What are shelters made of in urban shantytowns in paraguay - Religious literacy stephen prothero chapter summary - Bernard williams a critique of utilitarianism - In what way does the task environment differ from the general environment? - Give a detailed response non plagiarized with a credible reference. - Grammar boot camp worksheets - The trait and factor approach of career counseling incorporates - What's the iv and dv - Everest simulation environmentalist - S 2pirh 2pir 2 solve for r - High performance development model interview questions - Most abundant cation in extracellular fluid - Archer daniels midland and the friendly competitors case study - Definition of health promotion model - Capstone Research Companion - 1/9 molong avenue highett - Aps ils el1 profile - Discussion Post due08/30 10et - Additional funds needed problems and solutions - Ohm's law lab report answers - R - Human communication process - Math 30 formula sheet - Ielts ngoc bach speaking - Research - Annotated bibilography - Camp bow wow job application - Assignment - Essay on mobile phone for students - Molecular polarity lab - School uniform vs casual clothes - The signal by vsevolod garshin - Justice law clerk singapore - Difference between masters and johnson and kaplan - Triple j frequency geelong - Accounting principles 13th edition answers - Speech peer review - Zinnia union proposal - Computational thinking in real life - Midterm - Solubility of a salt lab answers - Significance of Air Freight in Military Aviation - SOURCE ANALYSIS - Clinton institute training - Full adder gate level verilog - Essentials of lifespan development 6th edition pdf - Nursing peer review strengths and weaknesses examples - Aqa required practicals chemistry - Cody jefferson embrace the lion - Help please - Paper writing help - Rate my professor college of the canyons - Evaluation in ayres sensory integration - Examples of information systems in daily life - Sam capstone project 1a - What does the word root gastr refer to - Everything's an argument mla citation - Effie company uses a periodic inventory system - Lewis v heartland inns of america llc - Complete care certificate workbook with answers - Can an adverb modify another adverb - Retrieved from http www ebrary com - West point medical center - Central tendency and spread homework answers - Idea 10 audit software free download - Discussion - 0.16667 as a fraction - A rocket starts from rest and moves upward - Need 8+ pages of PPT and 7+ pages of research along with all steps including step 10 chart in requirement with no plagiarism follow all instructions - The relationship between financial leverage and profitability pelican paper inc - As nzs 3000 2018 free - 25 callana avenue rostrevor - Best Strategies and Communication Methods for Handling Objections - Intercultural communication - Failed to establish a backside connection in datapower - Excel