Create program that allows user to interactively check out

Assignment Help Python Programming
Reference no: EM131964330

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.

Assignment Part 1 Details - 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!

Assignment Part 2 Details - Activity Flowchart

Using either the online website draw (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.

Assignment Part 3 Details - 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:- Progrraming.rar

Reference no: EM131964330

Questions Cloud

Explain the transition rules : Reply to Don Collizi. Write a memo or letter to Don explaining the new lease requirements as they apply to Boarshead. Explain the transition rules
How much total interest will you pay over repayment period : For a credit card with a balance of $7,500 and an interest rate of 14.99% (monthly compounding, charged on the outstanding balance each month).
What is a case-fatality rate and what does it measure : What is a case-fatality rate? What does it measure? How might you explain the discrepancy between the hospital cases and reported cases?
Create a document flowchart with the information case : Create a document flowchart (DIVIDE BY DEPARTMENTS) with the following information Case: Madison Water district bills its customers on a monthly cycle.
Create program that allows user to interactively check out : ITECH1400 – Foundations of Programming - Create a computer program that allows a user to interactively check out a number of products, then provides
What is cruiseliners weighted average cost of capital : Cruiseliners, Inc. has 230,000 shares of common stock outstanding at a market price of $40 a share. Cruiseliners' just paid an annual dividend in the amount.
Is stock research and analysis important : Your friend, Khaled, believes that since capital markets are efficient, he doesn't need to read the financial press or be involved in stock research.
Create a portfolio in excel on pilgrems pride : Create a portfolio in Excel on pilgrems pride, nike, coke-cola, and bank of america and include all the pertinent information.
What will your balance be at the end of one year : Your credit card charges an interest rate of 2.05% per month You have a current balance of $1,210, and want to pay it off Suppose you can afford to pay.

Reviews

len1964330

5/1/2018 12:56:19 AM

4a Analysis and documentation via code comments of the two functions provided. (8 * 0.5) + (16 * 0.5) = 12 marks 4b Incorporation of the two functions provided into your main submission so that the program does not crash when an illegal money value is provided, and also virtually ‘bags up’ the products purchased. 2

len1964330

5/1/2018 12:56:12 AM

1c Identification of the key properties of a CheckoutRegister as well as creation of a suitable Class Diagram which uses those properties, plus the four method signatures provided. 4 marks 2 Creation of an activity flowchart which clearly indicates how the program should operate, using the correct symbols for elements such as start/end points, processes and decisions/branches 10 marks 3 Programming of the product checkout simulation so that it: i) Creates a small number of Product instances that may be purchased, ii) Accepts simulated ‘scanning’ of a Product to identify it (including refusal to identify products which do not exist), iii) Adds a scanned Product to the CheckoutRegister’s list of products being purchased, iv) Allows the checkout of multiple products, v) Accepts ‘virtual money’ to pay for those products (you must pay enough to cover the cost of the items checked out), and vi) Prints a final receipt of the products purchased, along with the total cost, total paid and any change given. 5 + 5 + 5 + 5 + 5 + 5 = 30 marks. i) ii) iiI) iv) v) vi) Total:

len1964330

5/1/2018 12:56:04 AM

You must supply your program source code files and your document containing the first two section of the assignment as a single compressed archive called:You may supply your word processed documentation in either Microsoft Word or LibreOffice/OpenOffice formats only – no proprietary Mac specific formats, please.Part Assessment Criteria Weight Mark 1a Identification of properties of a typical supermarket Product. 10 * 0.5 = 5 marks 1b Application of abstraction to identify key properties of a typical supermarket Product as well as creation of a suitable Class Diagram. 4 marks

len1964330

5/1/2018 12:55:40 AM

Assignments will be marked on the basis of fulfilment of the requirements and the quality of the work. In addition to the marking criteria, marks may be deducted for failure to comply with the assignment requirements, including (but not limited to): • Incomplete implementation(s), and • Incomplete submissions (e.g. missing files), and • Poor spelling and grammar. Submit your assignment (all program source files plus your word processed document) to the Assignment 1 Upload location on Moodle before the deadline of Friday of week 7 at 5pm. The mark distribution for this assignment is explained on the next page – please look at it carefully and compare your submission to the marking guide.

Write a Review

Python Programming Questions & Answers

  Implement key exchange using the diffie-hellman algorithm

Implement key exchange using the Diffie-Hellman algorithm, when peer- to-peer connections are made between bots and achieve confidentiality through encryption of the client-server commu- nications with an appropriate block or stream cipher.

  Creates and returns a tuple containing details of employee

CE151 - creates and returns a tuple containing details of the employee specified by the string. The string should be assumed to have the format

  Write python program that prompt user to enter integer value

Write a python program that computes the average of 5 numbers. Create 5 variables to store 5 different integers. Prompt the user to input the integers.

  Create a single line plot with two line for lists

BIO380: Practical Computing for Scientists Assignment - create a single line plot with two line for lists that track the Prey and Predadator populations

  Convert hexadecimal 4c to decimal

Your first objective in this lesson is to understand binary numbers and hexadecimal numbers. Then, you must learn how to quickly and accurately convert between decimal numbers, binary numbers

  Write a program that uses a bar

Write a program that uses a bar chart to display the percent-ages of the overall grade represented by the project, quizzes the midterm exam and the final exam

  Write a program that generates two integers

Write a program that generates two integers under 100, show them on screen, and prompts the user to enter the sum of these two integers. The program then reports true if the answer is correct, false otherwise.

  How many cents for each paper

Using Tkinter for cents Program, find the How many cents for each Paper

  Design and implement a data structure for a social network

In this assignment you are required to design and implement a data structure for a social network (e.g., Facebook, LinkedIn, etc). You would also be required to implement an algorithm to show the connection.;

  Construction of the data dictionary

A first systematic step to a data science process, as we have learned from the lectures and practical sessions, is to construct a data dictionary for the dataset.

  Write another python program to decode the encoded message

Write another Python program to decode the encoded message according to the "circular Caesar cipher" problem presented in Programming Exercises 7 and 8 of Book Chapter 5.

  The dictionary order based on the ascii order

Needless to say, the dictionary order based on the ASCII order is not what a real-world indexing software wants. So, we want to implement the dictionary order of strings in the standard wa

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