Apps213: Products - BNU-CO452/bluej-apps21-Miridicent GitHub Wiki

App21-03: Product Stock Control

Description

The applications is used to keep track of the quantity of a set of products that are bought and sold.
Each product must contain a name, and id and the quantity currently in stock.

Basic Requirements

The application must simulate the following features

  1. Create a new product
  2. Print a product
  3. Buy various quantities of stock products
  4. Sell various quantities of stock products
  5. Add any number of new products to a stock list
  6. Print a list of all products and their stock levels

Main Requirements

  1. Demo Adding 10 new products to the stock list.
  2. Demo buying different quantities of 10 products
  3. Demo selling different quantities of 10 products
  4. Remove a product from the stock list based on ID
  5. Print a list of products based on part of the product name
  6. Print a list of products whose stock levels are low

The program must use an ArrayList so that there is no limit to how many products can be added to stock. There must also be a class (StockDemo) whose sole purpose is to demonstrate that the application can meet these requirements.

For testing purposes add 10 products, buy 10 products and sell least 10 products from the stock list.
Personalise the products the product list so that it is unique to you, and change the stock list heading so it has your name in it.

Make sure that errors messages will be displayed if a user tries to sell more of a product than is in stock or if they try to find a product that does not exists.

Advanced Requirements

Add a feature so that it possible to automatically re-stock all those products that have fallen below a fixed minimum stock level.

Testing

Stage 1: Testing Product

Test your app by:-

  1. Creating a new product.
  2. Print that product
  3. Decrease the quantity of that product
  4. Print that product
  5. Increase the quantity of that product
  6. Print that product
  7. Decrease the quantity of that product
  8. Print that product
  9. Create another new product
  10. Add the two products to the stock list
  11. Print the details of the stock list

Product Tests Test Stage 1

this image should be replaced by a screen shot taken by the student

Stage 2: Testing StockDemo

Test stage 2 of your app by:-

  1. Create a StockList
  2. Create a StockDemo with a StockList
  3. Adding 10 unique products
  4. Listing 10 Products
  5. Buying different quantities (1-10) of 10 products
  6. Selling different quantities (1-10) of 10 products
  7. Remove a product
  8. List all products that start with a phrase (e.g. "Samsung")
  9. List all products whose stock levels are below a set level

Tests02-1 Tests02-2 Test Stage 2

TestAdv Test Advance Rec

Evaluation

A list of 5 possible limitations of its functionality or improvements that could be made to this application to make it more useful

  1. There is no UI for the program meaning people have to know java to understand what's happening
  2. There isn't any sort if description for the products only the name
  3. It would be useful if the user could see how popular a certain product is so they could make sure to buy more of it than other products
  4. Cost of the products aren't shown, who knows how much there spending on this stuff
  5. Perhaps it could be improved with some kind of stockpile functionality, which would allow the user to store products rather than have them right there for sale straight away. this way the user could buy a product while it's cheap and then sell for higher later when that product is more in demand
⚠️ **GitHub.com Fallback** ⚠️