Program for simulating a supermarket self-service checkout

Assignment Help Other Subject
Reference no: EM132110746

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!

Note - Need Title page, Table of Content & Reference so please take care of it?

Attachment:- Assignment Files.rar

Reference no: EM132110746

Questions Cloud

Create your own blog using a program such as wordpress : Write your first blog entry. In it, identify your favorite search engine and explain, in a minimum of two full paragraphs, why you chose it. Be specific!
Would you change any current policies or procedures : How do you determine if you are meeting the industry standards for this area of risk? Would you change any current policies or procedures? How and why?
Create a hierarchy of the most important topics : Create a hierarchy of five (5) of the most important topics that you feel you need to address in this one-day course that best fits the course title.
Can someone explain the lagrangian function : Can someone explain the Lagrangian function? That is when to use it, how its used, and why we are using it. The topic is mean-variance portfolio choice.
Program for simulating a supermarket self-service checkout : Foundations of Programming Assignment - Supermarket Self-Service Checkout. Program for simulating a supermarket self-service checkout
What are the relevant economic theories : Is this statement true and what are the relevant economic theories?
Explain simply how has the execution plan changed : Explain simply how has the execution plan changed from the original query to your query - Make any additional changes (for example indexing)
Labor hours to manufacturer engine-generator set : We have sets of unit number and labor hours to manufacturer engine-generator set and unit number x and the labor hours y are collected to construct that design
Determining the terms of trade : Which of the terms of trade listed in Exhibit 5 are acceptable to both countries?

Reviews

inf2110746

10/17/2018 12:39:36 AM

Writing an impressive assignment is not a joke and also not an easy task. I got to know about Experts Mind. They quickly took all my worries and queries away by completing this writing assignment before the deadline. I am able to get an A+ grade in this particular assignment. I wish I would know this assignment service before years... Thanks once again...

len2110746

9/11/2018 11:39:55 PM

We need Title page, Table of Content & Reference so please take care of it. 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.

len2110746

9/11/2018 11:39:49 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). 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.

Write a Review

Other Subject Questions & Answers

  Explain the police brutality perception issue

Explain the Police Brutality Perception issue. Express the issue you found in your search. Refine your expression and include both the original and the refined version. Justify your revision.

  Writing research paper on teaching strategies and procedures

Writing a research paper plan on Teaching Strategies & Procedures.

  Propose a sampling plan to survey visitors at show

Conduct a literature review of about 600 words about customer satisfaction, in particular at shows. Propose a sampling plan to survey visitors at the show.

  Brief description of the diverse family system

A brief description of the diverse family system you selected. Then explain a potential barrier they might encounter in society. Finally, explain one skill a social worker might use to address this barrier on an individual, family, organizational,..

  Business plan-what be will vital objectives of your business

As per learning outcomes of your current course, whileentering in practical field, you are going to launch a new business of “Sheep Farm House &Breeding”. In order to avoid failure at any stage of your business, you are required to prepare acomprehen..

  Elements in most human disturbance

Analyze the four common elements in most of the human disturbance according to Kelly (threat, fear, anxiety, and guilt).

  What are some experiments for which you might want a lower

What are some experiments for which you might want a lower alpha level (e.g., 0.01)?What are some situations in which you might accept a higher level?

  What are the different types of screening or diagnostic test

What are the different types of screening or diagnostic tests available to study salmonella?

  Conflict between the dominant and subordinate groups

Describe strategies that can be developed to address the issue of inequality in resources that often results in conflict between the dominant and subordinate groups? related to cultural diversity in professons

  Explain the reasons for government regulation and cost of it

Explain the reasons for government regulation and the cost and benefits of it. Discuss the main reasons why a business should or should not be involved.

  What services are and are not covered in other nations

The film Escape Fire discusses the provision of care in the United States. Several concerns were raised in the film. A large cost for the health care system.

  Should the electoral college be reformed or abolished

Is presidential rhetoric regarding popular mandates inconsistent with this fact of presidential selection? Should the Electoral College be reformed or abolished

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