Java program

Objectives:

  • Use bequest to produce disingenuous and child rankes
  • Utilize multiple rankes in the identical program
  • Perform exemplar input validation
  • Implement a breach that uses polymorphism

Problem:

A slender electronics sodality has hired you to transcribe an contact to mould their schedule. The sodality requested a role-based approximation manage (RBAC) to extension the bond about using the new contact. The sodality to-boot requested that the contact menu must be lithe sufficient to confess adding new menu individuals to the menu delay minimal fluctuates. This includes re-ordering the menu individuals and making fluctuates to the spectry of a menu individual delayout having to fluctuate the rule.

Security:

The sodality has suggested to set-on-foot the contact by impulse the user for a userspectry and password to verify the user. There are two marks of users at this sodality, mouldrs and employees. If mouldrs log on to the contact, they achieve see all libertys on the menu schedule. If employees log on to the contact, they achieve see a poor set of libertys on the menu schedule. User instruction is stored in Users.dat rasp, which may or may not insist at the set-on-foot of the program. A super user “admin” delay password “admin” has already been hardcoded in the program to confess for the moderate setup and the creation of other users. The Users.dat rasp incloses the FirstName, LastName, Userspectry (condition insensitive), HashedPassword and a droop to declare whether a user is a mouldr or not. The rasp is comma disconnected and it is formatted as follows:

Joe, Last, jlast, 58c536ed8facc2c2a293a18a48e3e120, penny
Sam, sone, samsone, 2c2a293a18a48e3e12058c536ed8facc, spurious
Jane, Best, jbest, 293a18a48e3e12052058c536ed8facc2c, spurious

Note: Ensure that the 'AddUser' employment does not add image values, and the 'ChangePassword' employment does not fluctuate password if username/password is penetrateed awry. If adding a new user or changing the password is lucky, yield penny, or else yield spurious.

Application Menu:

The menu of the contact is dynamically loaded and displayed to the user simply behind the user luckyly logs on. The menu individuals achieve be loaded from rasp “MenuList.dat”, which may or may not insist at the set-on-foot of the contact. If the rasp doesn’t insist, the contact should illusion at definite an Departure menu individual as lapse. The rasp achieve inclose all menu individuals details, including the spectry of the charge that achieve be manufactured when the menu individual is clarified. If a menu individual is noticeable as detested (Boolean droop), simply mouldrs can see that individual. The rasp incloses the subjoined comma disconnected fields, Description, a Boolean droop to declare if the liberty is detested to mouldrs simply, and the spectry of the menu charge that achieve be manufactured when the liberty is clarified. The adjust and liberty calculate of a menu individual may fluctuate depending on how they are scheduleed in the rasp. The Departure liberty achieve constantly be scheduleed definite and it achieve not be in the rasp. 

Below is a specimen of how the MenuList.dat rasp looks like:

Add User, penny, AddUserCommand
Delete User, penny, DeleteUserCommand
Change Password, spurious, ChangePasswordCommand
Add New Product, penny, AddProductCommand

Note: The charge spectry of each menu individual must tally the spectry of the rank that you achieve produce in the rule (See AddProductCommand rank in the rule for illustration).

Inventory:

The schedule consists of multiple fruits of mark Fruit stored in rank ProductCatalog. The ProductCatalog is binding of all schedule operations that add, migrate, experience and upcontinuance a fruit. When printing a fruit instruction, the fruit retail expense should be adapted and displayed as courteous. Retail expense = (absorb + (latitude * absorb/100)). A schedule of employments has been acquired to this rank in the granted rule template. You must tool all scheduleed employments. The schedule fruits achieve be saved in rasp Inventory.dat, which may or may not insist when the program leading set-on-foots. The rasp achieve inclose the fruit matchless id (int), fruit spectry (string), absorb (double), portio (int) and latitude (int, integer that represents latitude percentage). 

The Inventory.dat rasp is comma disconnected 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 set-on-foots in deep() rule
  • Prompt user for userspectry and password
  • Authenticate user and deeptain the logged-on user object
  • Load schedule
  • Load and produce menu schedule
  • Display menu schedule and active the user for liberty
  • Execute clarified liberty
  • Keep displaying the menu until the user chooses to departure

Output Format:

Enter username: some username
Enter password: some password //Repeat actives until user is verifyd OR illusion blunder and
liberty to departure.
Invalid userspectry or password!
Press penetrate to live or “Exit” to departure:
Enter username: some username
Enter password: some password
Welcome Firstspectry LastName!
Inventory Management System Menu //This is the header of the MenuList

// The adjust and liberty calculate of a menu individual may fluctuate depending on how they are scheduleed in the MenuList.dat rasp. The Departure liberty achieve constantly be scheduleed definite and it achieve not be in the MenuList.dat rasp.

1- Add user
2- Migrate user
3- Fluctuate password
4- Add new fruit
5- Upcontinuance fruit instruction
6- Delete fruit
7- Display fruit instruction
8- Display schedule
9- Exit
Enter your selection: 7
Enter fruit spectry: sMaRt wAtCh

Id Spectry Absorb Portio Retail
----------------------------------------------------
3424 Smart Watch $20.45 23 $36.81

//Repeat the menu behind each charge is manufactured

Unit Testing:

A ace experiment rule is required to experiment each of the rules scheduleed adown. These rules achieve be used by the ace experimenting framework to experiment the achievement of your rule.

  • InventoryManagementSecurity.AuthenticateUser
  • InventoryManagementSecurity.AddNewUser
  • InventoryManagementSecurity.RemoveUser
  • InventoryManagementSecurity.ChangePassword
  • MenuList.AddMenuItem()
  • ProductCatalog.AddUpdateProduct(Product fruit)
  • ProductCatalog.RemoveProduct(int fruitId)
  • ProductCatalog.FindProduct(int fruitId)
  • ProductCatalog.PrintProductInformation(int fruitId)
  • ProductCatalog.PrintInventoryList()

Grading:

  • Coding exemplars, name and comments (10 Points)
  • Unit experimenting rules x 10, (2 points for each of the rules mentioned overhead - 20 Points)
  • The peace of the grade achieve be docile 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 tooling all charges for the menu schedule
  • ProductCatalog.AddUpdateProduct(Product fruit) (10 Points)
  • ProductCatalog.RemoveProduct(int fruitId) (5 Points)
  • ProductCatalog.FindProduct(int fruitId) (5 Points)
  • ProductCatalog.PrintProductInformation(int fruitId) (5 Points)
  • ProductCatalog.PrintInventoryList() (5 Points)

Notes:

  • The “InventoryManagement” Maven breach zip rasp has been granted to you in eLearning.
  • All *.dat rasps are conducive to be persomal to the running executable.
  • Do not fluctuate the rules stubs or constructors in the template. If in demur, content ask.
  • Your program is expected to own basic input validation.
  • You may use ArrayList in this project
  • Part 1 deliverables: Ace Experiment rules + AuthenticateUser() employment (no add or migrate user is required in portio 1). See eLearning for due continuance.
  • Part 2 deliverables: Functioning program including the Ace Experiment rules
Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency