Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Homework Help/Study Tips Expert

Foundations of Programming Assignment - Supermarket Self-Service Checkout

This assignment will test your skills in designing and programming applications to specification.

Assignment Overview - You are tasked with creating a text-based program for simulating a supermarket self-service checkout using the Python 3 programming language.

The assignment is broken up into four main components:

1) Design and model two classes: Product and CheckoutRegister,

2) Create an activity chart which describes the behaviour of the checkout system,

3) Create a computer program that allows a user to interactively check out a number of products, then provides an opportunity to enter some virtual money to pay for the products and finally and prints out a receipt for the user (to the screen, not on paper), and finally

4) Explain and integrate some code into your checkout program that places the products purchased into virtual shopping bags.

Your submission should consist of one Microsoft Word or LibreOffice document containing the first two parts of the assignment, and three Python scripts that implement the computer program (checkoutregister.py, product.py and main.py).

The main.py script runs the main logic of the program and will use instances of the CheckoutRegister and Product classes to simulate checking out of the supermarket.

You are provided with a Microsoft Word template to help you complete the first two parts of this assignment.

Towards the end of this document you will also be provided with the output of a simulated run of the completed computer program which may help you with this assignment.

Part 1 - Class Design

Think of a product that you can buy from a supermarket, like maybe a can of soup or an apple.

Start by listing all the properties of that object that you can think of - try to come up with at least ten general properties of a Product and write these down in your Assignment_Part_1_ Microsoft Word document.

Next, use the process of abstraction to cut the number of properties back to only four 'key' properties - write these down in the next section of your Word document. Take a look at the week 2 lecture slides if you need a reminder on how to go about this.

Now, fill in the class diagram for your Product class in the Word document template provided. Your product class does not have to have any methods (i.e. functions) associated with it to perform any actions other than a constructor which takes and set the four key properties that you've identified.

Next we'll move on to CheckoutRegister class - think about what information the checkout has to keep track of to allow you to successfully check out of the supermarket. There will only really be three key properties that the CheckoutRegister cares about, and the CheckoutRegister class should have the following four methods available:

1) A default constructor that takes no arguments and initialises a new object and its properties,

2) accept_payment(some_amount),

3) scan_item(some_product), and

4) print_receipt().

Fill in the class diagram for the CheckoutRegister class in the Word template, and that's the first part completed!

Part 2 - Activity Flowchart

Using either the online website (preferred), or the applications Visio or Powerpoint - create an activity diagram of how the program should operate to successfully scan one or more products, accept payment, provide change and print a receipt for the user.

Make sure to use the correct symbols in your diagram for starting, processes, decisions/branches, and ending the process.

Although you should be familiar with how a self-checkout works, if not then you can always go to a local supermarket with a self-checkout and buy a packet of chewing gum or something - or take a look at a YouTube video of self-service checkout.

Don't worry about loyalty/rewards cards to taking payment through debit or credit cards, our CheckoutRegister will only accept cash - although you can enter multiple denominations via multiple calls to the accept_money(some_amount) method. For example, calling accept_money(5.0) and then accept_money(2.0) will mean that the CheckoutRegister knows that you have entered a total of $7.00. Also note that you can start the entire checkout process off by simply scanning a product.

Once you have completed your activity flowchart, add it to your assignment template document.

Part 3 - Software Implementation

You are free to implement the software however you see fit, however the functionality of the software should be able to match the following output. Note that in the below run of the program I have 'hard-coded' a small number of Product instances so that products exist which can they can be checked out - in your code you should do the same.

Your program does not have to have the facility to add new products - just define a few and use them as demonstrated below. If the final option of (N)ext customer is chosen, the program should run again

Part 4 - Code Explanation and Use

You are provided with the following two functions which you should

1. Analyse to determine what they do & provide documentation comments for, and

2. Incorporate into your final program solution.

Wherever there is a # followed by some underscores in the code below, you should write a short comment explaining what the below section of code is doing, and if there is space why it is doing it. Do part 1 of the above in the provided assignment 1 template document, rather than here!

Attachment:- Assignment Files.rar

Homework Help/Study Tips, Others

  • Category:- Homework Help/Study Tips
  • Reference No.:- M93098197
  • Price:- $35

Priced at Now at $35, Verified Solution

Have any Question?


Related Questions in Homework Help/Study Tips

Question select a public health issue and write a 750-1000

Question: Select a public health issue and write a 750-1,000 word policy brief that provides a brief summary of the issue, options to solve the issue, and the best way to solve this issue. Select a public health issue fr ...

Assignment values and ethics in a diverse environmentin

Assignment : Values and Ethics in a Diverse Environment In this module, you learned about individual and organizational values, ethical behavior, and the relationship between communication and diversity. In addition, you ...

Question analyze the health status of a specific minority

Question: Analyze the health status of a specific minority group. Select a minority group that is represented in the USA. The response must be typed, single spaced, must be in times new roman font (size 12) and must foll ...

The american wilderness amp thoreauwrite a paragraph in

The American Wilderness & Thoreau Write a paragraph in response to each of the following questions. Be sure to indicate the assignment number and your name at the top of your paper (or the TA will have trouble giving you ...

Process recordingsthe assignment 2-4 pagesprovide a

Process Recordings The Assignment (2-4 pages): Provide a transcript of what happened during your field education experience, including a dialogue of interaction witha client. Explain your interpretation of what occurred ...

Answer the questionsbook -intro to law amp legal system of

Answer the questions Book -INTRO TO LAW & LEGAL SYSTEM OF THE US BURNHAM Publisher: WEST, ISBN: 9781634602075, Edition: 6TH , Copyright Year: 2016 Question 1 Describe the bases for federal subject matter jurisdiction and ...

English essay assignment - internet suffersquestion - need

English Essay Assignment - Internet Suffers Question - Need a classification essay on all the different types of internet suffers. With a word limit of 350-400 words. So need essay on the classification of different type ...

Question when considering the home care scenario in the

Question: When considering the Home Care scenario in the Allied Health Community, how would you identify the qualifying criteria to receive the potential $5 raise? What type of matrix would you build to apply raises? Wou ...

For one week use a minimum of one of the

For one week use a minimum of one of the following: • Productivity Planner • Headspace • Eisenhower Method Based upon your selection(s) write and submit a one-page reflection piece describing the impact the tool or tools ...

Question using the university digital library or the google

Question: Using the University Digital Library or the Google scholar website, locate a peer reviewed article about privacy. Write a critical evaluation of the article; make sure to include three to five key points that y ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As