Integrate some code into your checkout program

Assignment Help Other Subject
Reference no: EM132085786

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.

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

Assignment Part - 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

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!

Verified Expert

The solution file is prepared in ms word and created a text based program which simulates a super market self-service checkout using python programming language. This project consist of four main component are design classes and draw class diagram for super market self-service checkout, create activity chart which is used to describe the behavior of system, implement program which allow the user to interactive with system and check out number of products and finally print the receipt and last component is to explain coding part of product purchased into virtual shopping bags. The program screen shots are attached and references are included as per APA format.

Reference no: EM132085786

Questions Cloud

How much of these losses can cindy deduct : Cindy's share of the LLC s losses was $85,000 in 2014 and $45,000 in 2015. How much of these losses can Cindy deduct
Determine the lexicographic order of the names : Create an if-else logic to determine the lexicographic order of the names. This logic is supposed to be the same as the one you implemented in the incomplete ve
How much of the charitable contribution should pat deduct : Pat had AGI of $300,000. In completing her income tax return, how much of the charitable contribution should Pat deduct
Why do these three commands return the result they do : Why do these three commands return the result they do? Do all of the tools retrieve the information from the same place?
Integrate some code into your checkout program : ITECH1400 – Foundations of Programming - Supermarket Self-Service Checkout - Analyse to determine what they do & provide documentation comments
Compare harry potter to bilbo baggins : Compare Harry Potter to Bilbo Baggins. Which is the more typical mythological hero and why?
What is amount of gain wes will recognize on transaction : The activity has suspended passive losses of $60,000. What is the amount of gain Wes will recognize on this transaction
Describe each approach and compare their relative merits : What approaches are there to distinguish an OS process from other user processes. Briefly describe each approach and compare their relative merits.
What portion of these costs should be allocated to the cost : What portion of these costs should be allocated to the cost of the land and what portion should be allocated to the cost of the new building

Reviews

inf2085786

10/18/2018 12:27:23 AM

I am very much impressed with the service offered by Expertsmind.com. The expert who has worked on this assignment did the fabulous job. I just gone through the reading and the quality of paper is accurate and mind blowing. They replied all my queries away. Thank you so much, I know I would not be able to do this on my own. Thank you once again...

len2085786

8/13/2018 5:29:04 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

len2085786

8/13/2018 5:28:53 AM

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:

len2085786

8/13/2018 5:28:47 AM

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

len2085786

8/13/2018 5:28:40 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: Obviously replace with your own personal details! You may supply your word processed documentation in either Microsoft Word or LibreOffice/OpenOffice formats only – no proprietary Mac specific formats, please. 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.

Write a Review

Other Subject Questions & Answers

  Explain the linkage between each takeaway

Identify two to three (2-3) takeaways that you have learned or gained from the course learning activities. Explain the linkage between each takeaway.

  Identification and analysis of historical events

Identification and analysis of historical events, movements, or practices that led to policies and practices that have shaped today's probation and parole.

  What is the wide-scale power outage

Smaller scale emergencies, such as a tornado coming through a community or a wide-scale power outage in the middle of summer or winter?

  Discuss procedure who brought the appeal

Procedure Who brought the appeal. What was the outcome in the lower courts

  Identify specific future strategy actions and recommendation

Examine and critically incorporate peer and Faculty Member feedback offered during the Shared Activity to modify and improve your general ecosystem and stakeholder analysis work.

  Describe components of social-cognitive theory

Analyze one of your habits. How did you develop this habit? Were there role models for this habit? Which people influenced the adoption of this habit? Why do you continue it? Has there been a time when you have attempted to break this habit?

  How to translate into broader area of business ethics

What responsibility do computing professionals have to society at large and to other members of their profession? How does this translate into the broader area of business ethics?

  Predicting the future of iran

Predicting the Future of Iran

  Scientific method for understanding nature

Descartes set forth a scientific method for understanding nature. Discuss Descartes Method (his four steps). How does his method compare with today's understanding of the scientific method?

  What do historians mean by the term enlightened absolutism

What do historians mean by the term enlightened absolutism, and to what degree did eighteenth-century Prussia, Austria, and Russia exhibit its characteristics

  Describe the population and the sample in this study

Identify the main purpose(s) of this study as exploratory, descriptive, explanatory, or applied. Describe the population and the sample in this study. Is the population a cohort

  Modern western cultural ideas and ideals

How did the Age of the Renaissance contribute to modern Western cultural ideas and ideals? (You might consider architecture, literature, education, etc.)

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