Question
You are required to complete an interactive program (text-based) to be installed in a vending machine at the university. This vending machine is used to
You are required to complete an interactive program (text-based) to be installed in a vending machine at the university. This vending machine is used to dispense various products like tea, coffee, snacks, and cold drinks after coins are inserted. You must use Python 3 and write all code in a single Jupyter notebook. This means that there are no additional .py files and all classes and/or functions must be defined in that Jupyter notebook. Functional requirements In total, there are three kinds of requirements: User requirements (U-00X). System requirements (S-00X). Data requirements (D-00X). Each requirement is given a priority level: Critical This requirement is critical to the success of the project. High This requirement is a high priority, but the project can be implemented at a bare minimum without this requirement. Medium This requirement is somewhat important, as it provides some value but the project can proceed without it. Note that 'users' are the people who use the vending machine and 'customers' are the people who purchase the vending machine. The detailed requirements are prioritised as follows: Requirements:
Req# | Priority | Description | Rationale | Impacted stakeholders | Mark allocation |
U-001 | 1 | New transactions can be started | Users select restart to reset previous transactions and conditions to clear transaction history. | Users | 4.0% |
U-002 | 1 | List of products must be displayed | Users select a product from the list of products on the display screen. | Users | 4.0% |
U-003 | 1 | Cost of the selected item must be displayed | Users read and confirm by selecting the continue option. | 4.0% | |
U-004 | 1 | Coin must be inserted to get the product | A user can insert coins into the machine based on the indicated price. Note: In your program, you could use integers to represent the coins. For example: if the user wants to insert 50 cents, 20 cents and 1 dollar, the inputs of the program could be 50, 20, or 100 in cents. | Users | 4.0% |
S-002 | 1 | Only available items must be displayed as an item list, otherwise, appropriate information is provided to the user | e.g. coffee is unavailable | Users | 4.0% |
S-007 | 1 | The system must dispense the selected item only if the amount of coin is inserted (unless it must rollback the transaction) | The system will be able to back to the previous transaction (U-001) by a warning to the customer and ask to restart or give the warning and ask the user to pay the correct amount or reset. | Users | 4.0% |
S-010 | 1 | The system must accept coins of different amounts | e.g. 10 cents, 20 cents, 50 cents, 1 dollar, 2 dollars. | Users and customers | 4.0% |
S-011 | 1 | The system must compare item cost with entered coin | 4.0% | ||
S-012 | 1 | The system must check the validity of the coin | If the system accepts only 20 cents and the user enters 10 cents then the system should give a warning. | 4.0% | |
D-005 | 1 | The system must store the coins and record all transactions | 4.0% | ||
U-005 | 2 | The transaction can be cancelled as required | A user can select cancel anytime during the transaction | Users | 4.0% |
U-007 | 2 | The order can be changed as required | A user can change order e.g. if s/he doesnt have enough coins to buy the item they choose. | Users | 4.0% |
S-001 | 2 | The status of the machine is displayed | The system shall display status information (whether it is working or not). | Users and customers | 4.0% |
S-003 | 2 | Alert message is printed automatically by the machine if any of the ingredients are unavailable | E.g. if sugar is unavailable. | Customers | 4.0% |
S-004 | 2 | The system can refund the coin if in need by the user before the item gets ready for dispense | Coin may be refunded when the user cancels the request or the coin they insert is not sufficient with appropriate information to the user. | Users | 4.0% |
S-009 | 2 | The system shall allow a user to select products coffee, tea, Coke, and juice. |
| Users | 4.0% |
D-006 | 2 | The system needs to provide statistical data based on the transactions. | Statistical data may include the date which items were purchased and the payment (e.g. 20 cents 1 AUD) | 4.0% | |
U-006 | 3 | The transaction shall be continued as required without restarting the whole steps. | A user can select the continue to buy option. If a user buys a coffee and then a tea they can pay at the end rather than conducting transactions. | Users | 4.0% |
S-005 | 3 | The system shall display welcome and goodbye messages at the beginning and end of the transaction respectively. | Users and customers | 1.6% | |
S-006 | 3 | The system must display the waiting time as a message to the user in preparing the items. | e.g. during boiling, adding ingredients and the like. | Users | 1.6% |
S-008 | 3 | The system shall allow resetting operation for the vending machine supplier | e.g. for first-time installation | Customers | 2.4% |
D-003 | 3 | The system shall store coffee and allow the user to mix sugar manually or automatically by the machine. | 2.4% |
Exception handling
Your program should try to avoid or catch any kinds of exceptions and errors, so the execution wont be interrupted and it wont enter abnormal states. When handling exceptions related to user inputs, your system should return meaningful error messages so that the users can correct their inputs.
Documentation
Precise and concise comments/documents of your code are essential as part of the assessment criteria. Do not include things that are irrelevant in your code as that will reduce your code readability. In addition, you need to submit a report which (but not limited to):
Describes the high-level design of your programs.
Contains the design of the user cases to address each of the requirements. In this section, you need to capture screenshots of the results while executing your program. Your OLA will mark the functionality mainly based on the user cases and the captured results from executing your program. The following image is an example of one user case.
Note: sufficient evidence to prove the implementation of the requirements should be provided, otherwise marks will be deducted.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started