Describes the behaviour of the checkout system

Assignment Help Other Subject
Reference no: EM132110719

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_<YOUR_STUDENT_ID> 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

Reference no: EM132110719

Questions Cloud

Discuss how to access team productivity : Module 2 focuses on performance, productivity, and rewarding teamwork. Based on your understanding, discuss the following.
Protection to an infant industry : Under what conditions it might be justified to give tariff protection to an infant industry?
Explain the concept of digital disruption : Explain the concept of digital disruption through the use of an example.
Describe one reason for justifying protectionism : Describe one reason for justifying protectionism. Does that reason make economic sense and Why?
Describes the behaviour of the checkout system : Assignment - Supermarket Self-Service Checkout, Federation University. Create an activity chart which describes the behaviour of the checkout system
How much would foreign gain from the same trade : How much will Home gain if it trades 5 units of butter for 3 units of cloth? How much would Foreign gain from the same trade? Why?
Describe five segmentation variables for business markets : Kotler and Keller describe five segmentation variables for Business Markets Discuss them and the steps in the segmentation process.
Create your own definition of plagiarism : This week, you have seen many different definitions/descriptions of plagiarism. Create your own definition/description of plagiarism.
Glasses of lemonade ann lemonade stand : The following table shows how many glasses of lemonade Ann's lemonade stand can produce using different amounts of labour.

Reviews

inf2110719

10/18/2018 12:13:38 AM

These days, the internet is full of fake and Ponzi site for assignment help, I got a recommendation from one of my friends and I tried it, It is really a genuine website and authenticated. I looked at many factors, like the order details, location and popularity. And almost the reviews by other students its really impressive. My expert made a high quality solution that got me a grade A. Thank you so much!

len2110719

9/11/2018 11:30:37 PM

This assignment will test your skills in designing and programming applications to specification and is worth 20% of your non-invigilated (type A) marks for this course. This is an INDIVIDUAL ASSIGNMENT – and while you may discuss it with your fellow students, you must not share designs or code or you will be in breach of the university plagiarism rules. This assignment should take you approximately 20 hours to complete. You are tasked with creating a text-based program for simulating a supermarket self-service checkout using the Python 3 programming language.

len2110719

9/11/2018 11:30:29 PM

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).

len2110719

9/11/2018 11:30:23 PM

Programming of the product checkout simulation so that it: Creates a small number of Product instances that may be purchased, Accepts simulated ‘scanning’ of a Product to identify it (including refusal to identify products which do not exist), Adds a scanned Product to the CheckoutRegister’s list of products being purchased, Allows the checkout of multiple products, Accepts ‘virtual money’ to pay for those products (you must pay enough to cover the cost of the items checked out), and Prints a final receipt of the products purchased, along with the total cost, total paid and any change given.

Write a Review

Other Subject Questions & Answers

  Effects of attention on out-of-seat classroom behavior

What are the effects of attention on out-of-seat classroom behavior? What is the relationship between the quality of a marriage and the quality of the spouses' relationships with their siblings

  Derive an equation passing through the points

The number of corporate fraud cases pending stood at 545 at the beginning of 2008 (t=0) and was 726 cases at the beginning of 2012.

  Post an explanation of the nevada four guerrillas

Post an explanation of the Nevada Four guerrillas' competing obligations using Waldo's map of ethical obligations of a public servant.

  Review the given article regarding pay performance

Pay for Performance Article Review: Select any one article about employee performance based pay, choosing from the attachment.

  Summarize accident case highlighting critical human errors

Summarize the accident case highlighting the critical human errors - Investigate the accident and address the human factors involved in the situation

  Describe discussing this exciting concept

Consider what is being discussed in the salon in terms of education, politics, religion, and philosophy. Identify an idea or topic that excites you from this period. Describe discussing this exciting concept at the salon. What are their views?

  Society wants good healthcare

Society wants good healthcare, good education, good sources of energy etc... and national discussions revolve around how to achieve that good.

  Name two of e fabled cities of gold

Name two of e fabled cities of gold and tell why the explorers were so willing to believe the rumors about them

  Examine the course objectives and reflect how completion of

throughout this course many opportunities will arise to exchange opinions and comment on other students ideas. please

  Theories of social process and social conflict theories

In a 1-2 page, well constructed essay, discuss the major differences between theories of Social Process and Social Conflict theories. Which theory best explains criminal behavior?

  Values between lowest levels

To summarize the cumulative effect of the predictors, report the range of ˆp values between their lowest levels (x = 0.5, m = 0, f = 0) and their highest levels (x = 130, m = 1, f = 1).

  Why rodin had such an important influence on modern art

Explain why Rodin had such an important influence on modern art. Your initial post should be 75-150 words in length. Then, make at least two thoughtful responses to your fellow students' posts.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd