Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create programme in SCILAB that determines the amount of change given back to a customer in a self - service checkout machine e . g
Create programme in SCILAB that determines the amount of change given back to a customer in a selfservice checkout machine eg vending machine.
The program generates a number between and and displays the amount of money you owe needs to be paid. The program then asks the user to enter a payment. As a customer, you can only pay with one R coin, one R coin, one R coin, one R note, one R note, one R note, one R note or one R note.
If you pay with a note or a coin that is less than the amount, an error message has to be displayed. The error message should say, Sorry please add more money to purchase
If the payment is sufficient, the program calculates the charge and lists the bills andor the coins that make up the change, which has to be composed of the least number of bills and coins.
For example, if the amount to be paid is R and you pay with a R note, then the change would be as follows:
x R
x R
x c
x c
Execute the programme ten times and indicate the values you have used neatly in table format. Do not use values that require a c or c as this has been discontinued in South Africa. The program should contain pseudocode in flowchart format or recipe format for easier understanding. Ensure that each line of code majority of the code has a description on the side, which explains to the marker what your train of thought was used ie make use of the symbols
Tips:
You will need to make use of a combination of loops
You can make use of switch case loops as well.
Make use of the textbooks and other resources to assist you.
SUBTOTAL:
Section B
Marks
Based on the question above, adjust the code such that, when you have amounts that are Rc or Rc in the amount, you need to give either a c change or a c If the amount you owe ends on R you need to receive a c change. If the amount you owe, ends on R you should receive a c change.
Create a table with the amount required and the change is given as in Section A but only complete ten iterations. Complete five sets of two iterations. For example, five iterations for rounding up and five iterations for rounding down. Do not repeat the values used in Section A
For example, if the amount you need to pay is R and you pay with R not, the change that you will get is as follows:
x R
x R
x R
x c
The c is discontinued therefore you cannot make use of it
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