Supermarket self-service checkout

Assignment Help Programming Languages
Reference no: EM131971777

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: EM131971777

Questions Cloud

What is the amount of depreciation allowed : What is the amount of depreciation allowed in 2016 and 2017 if Sec. 179 depreciation (first-year expense election) was not elected?
Can asia erase their problems : Would it be possible to have all countries eventually "equal"? Why, or why not? Can Asia (including such countries as India or China) erase their problems?
What is an idea for a safer and cleaner energy : Could we clean up the coal industry to make it cleaner? Should we just add more nuclear plants with better controls and back up systems?
Compute robert and susans taxable income : Compute Robert and Susan's taxable income for 2015, the tax on this income, and the amount of any refund or additional tax due.
Supermarket self-service checkout : ITECH1400 – Foundations of Programming - Supermarket Self-Service Checkout - Design and model two classes: Product and CheckoutRegister
How is the word myth used popularly : After considering the definition in your textbooks and course materials, write a definition in your own words.
Discuss the impact on eve sensitivity : Discuss the impact each of the following will have, in general, on EVE sensitivity to a change in interest rates. Consider two cases where rates rise sharply.
Discuss about an article that represents a deviant act : Select an article from a national newspaper that you believe represents a deviant act.
Traditional approach to modeling a use case : Outline the primary ways in which the traditional approach to modeling a use case differs from an object-oriented approach.

Reviews

Write a Review

Programming Languages Questions & Answers

  What graphical element appears on a shortcut icon

Which of the following locations is not a valid place from which to delete a file and send it to the Recycle Bin?

  A method to calculate the value of the entire inventory

Create a method to calculate the value of the entire inventory. Create another method to sort the array items by the name of the product.

  Write a line of code for the declaration of getgpa

Write a line of code for the declaration of getGPA from question 8 to make it a virtual function. What about the protected members?

  Design program to list total points scored for classroom

Student ID, classroom number, and score on the achievement test. Design a program that lists the total points scored for each of the 30 classrooms.

  Create program using top-down modular approach

Use top-down modular approach and pseudocode to create suitable program to solve this problem. Validating your input data is also essential.

  Design a program allow the user to select air

Design a program that displays a menu allowing the user to select air, water, or steel. After the user has made a selection, he or she should be asked to enter the number of seconds the sound will travel in the selected medium

  Create an application to calculate sales persons salary

a salesperson who grosses $5000 in sales in a week receives $150 plus 10% of $5000, a total of $650. Write an application that calculate each sales person's total salary per week.

  Create the logic for a program which merges two files

Create the logic for a program which merges the two files into one file containing list of all students in district, maintaining student id number order.

  Use that function to output each line of the countdown

Write code to create a web page that uses a JavaScript program to output a NASA style count down:

  Write organized sequential code with no errors

Real application Assignment - Write organized, sequential code with no errors for dataset comparisons. The results to be generated on main screen

  Write program to compute and outputs the average gpa

Write a program that computes and outputs the average GPA for both female and male students. Format your results to two decimal places. Your program should use the functions.

  Write down public static method using public interface

Using only public interface of UnorderedLinkedList class, write down a method: public static void reverse(UnorderedLinkedList staff) that reverses the entries in a linked list.

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