asked 219k views
2 votes
Self-Checkout Machine Software

Learning aim, A: Examine the computational thinking skills and principles of computer
programming

You are a junior programmer working for a software development company called CodeFirst
based in Burnley. You have been asked to design and develop a software that runs on a self-checkout machine at ASDA supermarket.

The software must be able to determine how much change to provide when the shopper
pays for a purchase with cash.
The program should begin by reading a number of pennies from the user as an integer.

Then the program should compute and display the denominations of the coins that should be
used to give that amount of change to the shopper. The change should be given using as
few coins as possible. Assume that the machine is loaded with 1 penny, 2 penny, 5 penny, 10 penny, 20 penny, 50 penny, 1 pound, and 2 pounds.

1 Answer

3 votes

Answer:

This function takes as input the number of pennies owed to the shopper and returns a list of coins that should be used to give that amount of change to the shopper. The change is given using as few coins as possible.

answered
User Jonathan Allard
by
8.6k points