Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

alan67160/ITP3915Assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ITP3915 - Programming Fundamentals Assignment

A inventory management system

Download

Requirement

  • This Inventory Management System has 4 functions. Users are allowed to borrow item(s), return item(s), Display item(s) borrowed by particular user, and Display all records
    • show main menu
      • borrow item(s)
      • return item(s)
      • Display item(s) borrowed by particular user
      • Display all records
    • ask for select functions
  • Only 5 item(s) are allowed to borrow or return in this system
  • To borrow an item, user is required to input the item number to borrow, the number of quantity to borrow (given that the quantity left satisfy user's request), and the borrower's name
    • show item list with remaining quantity
    • ask item no
    • ask quantity
    • quantity check
    • ask borrower's name
    • show borrow record of the borrower after borrow
  • To return an item, user is required to input the borrower's name, the item number to return, the number of quantity to return (given that the quantity to return is small than or equals to the quantity borrowed)
    • ask borrower's name
    • show borrow record of the the borrower
    • ask item no
    • ask quantity
    • quantity check
    • show borrow record of the borrower after return
  • The borrower's name, quantity borrowed (or returned), item name, and list of item(s) this borrower's currently borrowed would be displayed for every successful borrow or return action
  • The list of allowed borrowers are stored in a text file named "borrowers.txt"
    • read borrowers.txt
    • write to user_list

Test Plan

ID Test Case Name Procedure Expected Output Result
01 Main menu In the inventory management main menu, input 4 or -1 An error message "Invalid input for choice" should be displayed and will ask the user to input function number again Pass / Fail
In the inventory management main menu, input a An error message "Invalid input for choice" should be displayed and will ask the user to input function number again Pass / Fail
02 Return item - item no In the inventory management return item no, input 99 or -99 An error message "you can't select a non-exist item" should be displayed and will ask the user to input function number again Pass / Fail
In the inventory management return item no, input b An error message "Invalid value for item no." should be displayed and will ask the user to input function number again Pass / Fail
03 Return item - quantity In the inventory management return quantity, input 0 or -99 An error message "You can't return less then 1 item." should be displayed and will ask the user to input function number again Pass / Fail
In the inventory management return quantity, input b An error message "Invalid value for item no." should be displayed and will ask the user to input function number again Pass / Fail
In the inventory management return quantity, input 4, but the user only borrowed 3 An error message "Your return quantity is over your borrow record." should be displayed and will ask the user to input function number again Pass / Fail
04 borrow item - item no In the inventory management borrow item no, input 99 or -99 An error message "you can't select a non-exist item" should be displayed and will ask the user to input function number again Pass / Fail
In the inventory management borrow item no, input b An error message "Invalid value for item no." should be displayed and will ask the user to input function number again Pass / Fail
In the inventory management borrow item no, input 1, but item 1 is out of stock An error message "The selected item is currently out of stock." should be displayed and will ask the user to input function number again Pass / Fail
05 Pass / Fail
06 Pass / Fail
07 Pass / Fail
08 Pass / Fail
09 Pass / Fail
10 Pass / Fail

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Languages