SlideShare a Scribd company logo
1 of 4
CS 2336 PROJECT 3 – Linked Inventory Management Project
Due: 11/04 by 11:59 PM KEY ITEMS: Key items are marked in
red. Failure to include or complete key items will incur
additional deductions as noted beside the item. Submission: •
The file containing main must be named Main.java. (-5 points) •
The project files must be in packages that start with
LinkedInventoryManagement.* (-5 points) • All project
deliverables are to be submitted in eLearning until further
notice o Zip the contents of the src directory into a single
zipped file o Make sure the zipped file has a .zip extension (not
.tar, .rar, .7z, etc.) (-5 points) o Add your project’s presentation
link in the comments section in eLearning • Programs must
compile and run with Java SE 13. • Each student is responsible
for developing unit test cases to ensure their program works as
expected. • Type your name and netID in the comments at the
top of all files submitted. (-5 points) Objectives: • Create a
modular code solution with multi-packages • Use the Singleton
pattern to create and manage the Scanner object • Create and
manipulate a multi-directional LinkedList in Java • Use Java
Generics to create generic classes and methods • Implement and
use the Comparable interface 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 asking the user for a
username and password to ensure that the user is authorized to
access the application. 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,
2c2a293a18a48e3e12058c536ed8facc, false Jane, Best, jbest,
293a18a48e3e12052058c536ed8facc2c, 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. The file may contain duplicate menu
items. Your program should detect this by checking the
command name as a key to compare menu items and prevent
showing duplicates in the menu. 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). Your
program must prevent the user from inserting duplicate products
by checking existing products using the product name (ignore
case) as a comparison key. 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 Data Structure: The MenuList and
ProductCatalog classes must use a custom LinkedList that you
will create instead of using an ArrayList. The nodes in this list
must be multi-directional to facilitate moving from current node
to next node and from current node to previous node if needed.
This custom linked list must be named InventoryLinkedList,
must be generic, and must contain at least the following
methods: - public InventoryLinkedList(E[] elements)
//Constructor - public E GetFirst() //Get the first element in the
list - public E GetLast() //Get the last element in the list -
public void Insert(int index, E element) //Inserts element e at
the specified index - public E Remove(int index) //Remove the
element at the specified index - public String toString() //Return
formatted elements information - public boolean Contains(E
element) //Check if list contains the element - public E
SetElement(int index, E element) //Set the element at the
specified index - public E GetElement(int index) //Get the
element at the specified index - public Integer GetLength()
//Returns the number of elements in the list 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 Type “Next” or “Previous” to display next/previous
product, press enter to return: next Id Name Cost Quantity
Retail ------------------------------------------------------------
65454 Flat Screen TV $465.98 15 $629.07 Type “Next” or
“Previous” to display next/previous product, press enter to
return: next End of products list… //Displayed if no more
products in the list Type “Next” or “Previous” to display
next/previous product, press enter to return: //Enter //Repeat the
menu after each command is executed.

More Related Content

Similar to CS 2336 PROJECT 3 – Linked Inventory Management Project Due 1104 b.docx

Product Base Currency Magento Extension Manual 1.0.0.1
Product Base Currency Magento Extension Manual 1.0.0.1Product Base Currency Magento Extension Manual 1.0.0.1
Product Base Currency Magento Extension Manual 1.0.0.1
innoexts
 
Data_Processing_Program
Data_Processing_ProgramData_Processing_Program
Data_Processing_Program
Neil Dahlqvist
 
STATA_Training_for_data_science_juniors.pdf
STATA_Training_for_data_science_juniors.pdfSTATA_Training_for_data_science_juniors.pdf
STATA_Training_for_data_science_juniors.pdf
AronMozart1
 
Lab #9 and 10 Web Server ProgrammingCreate a New Folder I s.docx
Lab #9 and 10 Web Server ProgrammingCreate a New Folder  I s.docxLab #9 and 10 Web Server ProgrammingCreate a New Folder  I s.docx
Lab #9 and 10 Web Server ProgrammingCreate a New Folder I s.docx
DIPESH30
 
show code and all classes with full implementation for these Program S.pdf
show code and all classes with full implementation for these Program S.pdfshow code and all classes with full implementation for these Program S.pdf
show code and all classes with full implementation for these Program S.pdf
AlanSmDDyerl
 
Program Specifications in c++ Develop an inventory management system f.docx
Program Specifications in c++ Develop an inventory management system f.docxProgram Specifications in c++ Develop an inventory management system f.docx
Program Specifications in c++ Develop an inventory management system f.docx
sharold2
 
Program Specifications in c++ Develop an inventory management syste.docx
Program Specifications in c++    Develop an inventory management syste.docxProgram Specifications in c++    Develop an inventory management syste.docx
Program Specifications in c++ Develop an inventory management syste.docx
sharold2
 
The is running major errors for the other person that assisted with .pdf
The is running major errors for the other person that assisted with .pdfThe is running major errors for the other person that assisted with .pdf
The is running major errors for the other person that assisted with .pdf
preetamsahu17
 

Similar to CS 2336 PROJECT 3 – Linked Inventory Management Project Due 1104 b.docx (20)

Product Base Currency Magento Extension Manual 1.0.0.1
Product Base Currency Magento Extension Manual 1.0.0.1Product Base Currency Magento Extension Manual 1.0.0.1
Product Base Currency Magento Extension Manual 1.0.0.1
 
Computing assignment 02 ms access (bilal maqbool 10) se-i
Computing assignment 02   ms access (bilal maqbool 10)          se-iComputing assignment 02   ms access (bilal maqbool 10)          se-i
Computing assignment 02 ms access (bilal maqbool 10) se-i
 
Constraint Based Configuration Model Explained
Constraint Based Configuration Model ExplainedConstraint Based Configuration Model Explained
Constraint Based Configuration Model Explained
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
 
ArduinoWorkshop2.pdf
ArduinoWorkshop2.pdfArduinoWorkshop2.pdf
ArduinoWorkshop2.pdf
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
C++ Tutorial
C++ TutorialC++ Tutorial
C++ Tutorial
 
Data_Processing_Program
Data_Processing_ProgramData_Processing_Program
Data_Processing_Program
 
STATA_Training_for_data_science_juniors.pdf
STATA_Training_for_data_science_juniors.pdfSTATA_Training_for_data_science_juniors.pdf
STATA_Training_for_data_science_juniors.pdf
 
Lab #9 and 10 Web Server ProgrammingCreate a New Folder I s.docx
Lab #9 and 10 Web Server ProgrammingCreate a New Folder  I s.docxLab #9 and 10 Web Server ProgrammingCreate a New Folder  I s.docx
Lab #9 and 10 Web Server ProgrammingCreate a New Folder I s.docx
 
Sap enhanced functions
Sap enhanced functionsSap enhanced functions
Sap enhanced functions
 
Tips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptxTips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptx
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7
 
show code and all classes with full implementation for these Program S.pdf
show code and all classes with full implementation for these Program S.pdfshow code and all classes with full implementation for these Program S.pdf
show code and all classes with full implementation for these Program S.pdf
 
E-Bazaar
E-BazaarE-Bazaar
E-Bazaar
 
Program Specifications in c++ Develop an inventory management system f.docx
Program Specifications in c++ Develop an inventory management system f.docxProgram Specifications in c++ Develop an inventory management system f.docx
Program Specifications in c++ Develop an inventory management system f.docx
 
Program Specifications in c++ Develop an inventory management syste.docx
Program Specifications in c++    Develop an inventory management syste.docxProgram Specifications in c++    Develop an inventory management syste.docx
Program Specifications in c++ Develop an inventory management syste.docx
 
The is running major errors for the other person that assisted with .pdf
The is running major errors for the other person that assisted with .pdfThe is running major errors for the other person that assisted with .pdf
The is running major errors for the other person that assisted with .pdf
 
Lesson 4
Lesson 4Lesson 4
Lesson 4
 
Programming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) EnvironmentProgramming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) Environment
 

More from mydrynan

CSIA 413 Cybersecurity Policy, Plans, and Programs.docx
CSIA 413 Cybersecurity Policy, Plans, and Programs.docxCSIA 413 Cybersecurity Policy, Plans, and Programs.docx
CSIA 413 Cybersecurity Policy, Plans, and Programs.docx
mydrynan
 
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docxCSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
mydrynan
 
CSI Paper Grading Rubric- (worth a possible 100 points) .docx
CSI Paper Grading Rubric- (worth a possible 100 points)   .docxCSI Paper Grading Rubric- (worth a possible 100 points)   .docx
CSI Paper Grading Rubric- (worth a possible 100 points) .docx
mydrynan
 
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docx
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docxCSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docx
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docx
mydrynan
 
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docx
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docxCSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docx
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docx
mydrynan
 
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018  Ho.docxCSE422 Section 002 – Computer Networking Fall 2018  Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docx
mydrynan
 
CSCI  132  Practical  Unix  and  Programming   .docx
CSCI  132  Practical  Unix  and  Programming   .docxCSCI  132  Practical  Unix  and  Programming   .docx
CSCI  132  Practical  Unix  and  Programming   .docx
mydrynan
 
CSCI 714 Software Project Planning and EstimationLec.docx
CSCI 714 Software Project Planning and EstimationLec.docxCSCI 714 Software Project Planning and EstimationLec.docx
CSCI 714 Software Project Planning and EstimationLec.docx
mydrynan
 
CSCI 561Research Paper Topic Proposal and Outline Instructions.docx
CSCI 561Research Paper Topic Proposal and Outline Instructions.docxCSCI 561Research Paper Topic Proposal and Outline Instructions.docx
CSCI 561Research Paper Topic Proposal and Outline Instructions.docx
mydrynan
 
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docx
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docxCSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docx
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docx
mydrynan
 
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docx
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docxCryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docx
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docx
mydrynan
 
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docx
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docxCSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docx
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docx
mydrynan
 
CSCE 1040 Homework 2 For this assignment we are going to .docx
CSCE 1040 Homework 2  For this assignment we are going to .docxCSCE 1040 Homework 2  For this assignment we are going to .docx
CSCE 1040 Homework 2 For this assignment we are going to .docx
mydrynan
 
CSCE509–Spring2019Assignment3updated01May19DU.docx
CSCE509–Spring2019Assignment3updated01May19DU.docxCSCE509–Spring2019Assignment3updated01May19DU.docx
CSCE509–Spring2019Assignment3updated01May19DU.docx
mydrynan
 
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docx
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docxCSCI 2033 Elementary Computational Linear Algebra(Spring 20.docx
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docx
mydrynan
 
CSCE 3110 Data Structures & Algorithms Summer 2019 1 of .docx
CSCE 3110 Data Structures & Algorithms Summer 2019   1 of .docxCSCE 3110 Data Structures & Algorithms Summer 2019   1 of .docx
CSCE 3110 Data Structures & Algorithms Summer 2019 1 of .docx
mydrynan
 
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docx
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docxCSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docx
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docx
mydrynan
 
CSC-321 Final Writing Assignment In this assignment, you .docx
CSC-321 Final Writing Assignment  In this assignment, you .docxCSC-321 Final Writing Assignment  In this assignment, you .docx
CSC-321 Final Writing Assignment In this assignment, you .docx
mydrynan
 
Cryptography is the application of algorithms to ensure the confiden.docx
Cryptography is the application of algorithms to ensure the confiden.docxCryptography is the application of algorithms to ensure the confiden.docx
Cryptography is the application of algorithms to ensure the confiden.docx
mydrynan
 
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docx
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docxCSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docx
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docx
mydrynan
 

More from mydrynan (20)

CSIA 413 Cybersecurity Policy, Plans, and Programs.docx
CSIA 413 Cybersecurity Policy, Plans, and Programs.docxCSIA 413 Cybersecurity Policy, Plans, and Programs.docx
CSIA 413 Cybersecurity Policy, Plans, and Programs.docx
 
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docxCSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
 
CSI Paper Grading Rubric- (worth a possible 100 points) .docx
CSI Paper Grading Rubric- (worth a possible 100 points)   .docxCSI Paper Grading Rubric- (worth a possible 100 points)   .docx
CSI Paper Grading Rubric- (worth a possible 100 points) .docx
 
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docx
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docxCSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docx
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docx
 
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docx
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docxCSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docx
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docx
 
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018  Ho.docxCSE422 Section 002 – Computer Networking Fall 2018  Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docx
 
CSCI  132  Practical  Unix  and  Programming   .docx
CSCI  132  Practical  Unix  and  Programming   .docxCSCI  132  Practical  Unix  and  Programming   .docx
CSCI  132  Practical  Unix  and  Programming   .docx
 
CSCI 714 Software Project Planning and EstimationLec.docx
CSCI 714 Software Project Planning and EstimationLec.docxCSCI 714 Software Project Planning and EstimationLec.docx
CSCI 714 Software Project Planning and EstimationLec.docx
 
CSCI 561Research Paper Topic Proposal and Outline Instructions.docx
CSCI 561Research Paper Topic Proposal and Outline Instructions.docxCSCI 561Research Paper Topic Proposal and Outline Instructions.docx
CSCI 561Research Paper Topic Proposal and Outline Instructions.docx
 
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docx
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docxCSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docx
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docx
 
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docx
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docxCryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docx
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docx
 
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docx
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docxCSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docx
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docx
 
CSCE 1040 Homework 2 For this assignment we are going to .docx
CSCE 1040 Homework 2  For this assignment we are going to .docxCSCE 1040 Homework 2  For this assignment we are going to .docx
CSCE 1040 Homework 2 For this assignment we are going to .docx
 
CSCE509–Spring2019Assignment3updated01May19DU.docx
CSCE509–Spring2019Assignment3updated01May19DU.docxCSCE509–Spring2019Assignment3updated01May19DU.docx
CSCE509–Spring2019Assignment3updated01May19DU.docx
 
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docx
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docxCSCI 2033 Elementary Computational Linear Algebra(Spring 20.docx
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docx
 
CSCE 3110 Data Structures & Algorithms Summer 2019 1 of .docx
CSCE 3110 Data Structures & Algorithms Summer 2019   1 of .docxCSCE 3110 Data Structures & Algorithms Summer 2019   1 of .docx
CSCE 3110 Data Structures & Algorithms Summer 2019 1 of .docx
 
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docx
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docxCSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docx
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docx
 
CSC-321 Final Writing Assignment In this assignment, you .docx
CSC-321 Final Writing Assignment  In this assignment, you .docxCSC-321 Final Writing Assignment  In this assignment, you .docx
CSC-321 Final Writing Assignment In this assignment, you .docx
 
Cryptography is the application of algorithms to ensure the confiden.docx
Cryptography is the application of algorithms to ensure the confiden.docxCryptography is the application of algorithms to ensure the confiden.docx
Cryptography is the application of algorithms to ensure the confiden.docx
 
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docx
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docxCSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docx
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docx
 

Recently uploaded

QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use Cases
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 

CS 2336 PROJECT 3 – Linked Inventory Management Project Due 1104 b.docx

  • 1. CS 2336 PROJECT 3 – Linked Inventory Management Project Due: 11/04 by 11:59 PM KEY ITEMS: Key items are marked in red. Failure to include or complete key items will incur additional deductions as noted beside the item. Submission: • The file containing main must be named Main.java. (-5 points) • The project files must be in packages that start with LinkedInventoryManagement.* (-5 points) • All project deliverables are to be submitted in eLearning until further notice o Zip the contents of the src directory into a single zipped file o Make sure the zipped file has a .zip extension (not .tar, .rar, .7z, etc.) (-5 points) o Add your project’s presentation link in the comments section in eLearning • Programs must compile and run with Java SE 13. • Each student is responsible for developing unit test cases to ensure their program works as expected. • Type your name and netID in the comments at the top of all files submitted. (-5 points) Objectives: • Create a modular code solution with multi-packages • Use the Singleton pattern to create and manage the Scanner object • Create and manipulate a multi-directional LinkedList in Java • Use Java Generics to create generic classes and methods • Implement and use the Comparable interface 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 asking the user for a username and password to ensure that the user is authorized to access the application. 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
  • 2. 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, 2c2a293a18a48e3e12058c536ed8facc, false Jane, Best, jbest, 293a18a48e3e12052058c536ed8facc2c, 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. The file may contain duplicate menu items. Your program should detect this by checking the command name as a key to compare menu items and prevent showing duplicates in the menu. 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
  • 3. 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). Your program must prevent the user from inserting duplicate products by checking existing products using the product name (ignore case) as a comparison key. 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 Data Structure: The MenuList and ProductCatalog classes must use a custom LinkedList that you will create instead of using an ArrayList. The nodes in this list must be multi-directional to facilitate moving from current node to next node and from current node to previous node if needed. This custom linked list must be named InventoryLinkedList, must be generic, and must contain at least the following methods: - public InventoryLinkedList(E[] elements) //Constructor - public E GetFirst() //Get the first element in the list - public E GetLast() //Get the last element in the list - public void Insert(int index, E element) //Inserts element e at the specified index - public E Remove(int index) //Remove the element at the specified index - public String toString() //Return formatted elements information - public boolean Contains(E element) //Check if list contains the element - public E SetElement(int index, E element) //Set the element at the specified index - public E GetElement(int index) //Get the element at the specified index - public Integer GetLength()
  • 4. //Returns the number of elements in the list 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 Type “Next” or “Previous” to display next/previous product, press enter to return: next Id Name Cost Quantity Retail ------------------------------------------------------------ 65454 Flat Screen TV $465.98 15 $629.07 Type “Next” or “Previous” to display next/previous product, press enter to return: next End of products list… //Displayed if no more products in the list Type “Next” or “Previous” to display next/previous product, press enter to return: //Enter //Repeat the menu after each command is executed.