App05 Product Stock - lily-uwu/BlueJ-PartA GitHub Wiki

App05: Product Stock Application (with console based UI)

Description

This application is made to simulate an application used for stock control. Products can be added, removed, renamed, viewed and their quantities increased and decreased.

Program Design

UML: Use Case Diagram

UML: Use Case Diagram

UML: Class Diagram

UML: Class Diagram

Testing

Black Box Testing

Test No Proposed Test Data Entered Expected Result Actual Result Comments
01 Add Product id = 100,
Name = "Apples"
Product added Product Added
02 Add Product id = 101,
Name = "Bananas"
Product added Product Added
03 Add Product id = 102,
Name = "Oranges"
Product added Product Added
04 Add Product id = 103,
Name = "Kiwis"
Product added Product Added
05 Add Product id = 104,
Name = "Grapes"
Product added Product Added
06 Add Product
(duplicate ID)
id = 100,
name = "Product"
Error Message Error Message
07 Add Product
(blank name)
id = 105,
name = ""
Error Message Error Message
08 Remove Product id = 104 Product removed Product Removed
09 Remove Product
(invalid ID)
id = 105 Error Message Error Message
10 Print All Products Print Chosen 4 products listed 4 product listed
11 Deliver Product id = 100,
amount = 8
quantity = 8 quantity = 8
12 Deliver Product
(-ve amount)
id = 100,
amount = -4
Error Message Error Message
13 Sell Product id = 100,
amount = 2
quantity = 6 quantity = 6
14 Sell Product
(> stock)
id = 100,
amount = 10
Error Message Error Message
15 Sell Product
(-ve quantity)
id = 100,
quantity = -2
Error Message Error Message
16 Search Product name = "App" 1 Product Listed 1 Product Listed
17 Low Stock amount = 2 3 Products Listed 3 Product listed

Links to testing

Tests 1 to 7.txt
Tests 8 to 17.txt

Evaluation

Imagine that Amazon were considering switching to use your java application, name the 5 most important features that you would need to add in order for it to be useable to Amazon

  • UI to be added
  • Products stored in a database
  • Stock list to be accessed from anywhere
  • Users to be added
  • Products to be categorised
⚠️ **GitHub.com Fallback** ⚠️