Design and model two classes - product and checkoutregister

Assignment Help Other Subject
Reference no: EM132110703

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

Questions Cloud

Skills in communicating with impatient customers : What can you do to improve your skills in communicating with impatient customers?
What will this trend mean for future of american federalism : How do you think interdependency and the federal government's superior taxing power contributed to a larger policy role for the national government?
The family influence the consumer socialization of children : How does the family influence the consumer socialization of children? What role does television advertising play in consumer socialization?
Social media is completely revolutionizing way organizations : Social media is completely revolutionizing the way organizations and individuals communicate.
Design and model two classes - product and checkoutregister : ITECH1400 - Foundations of Programming Assignment - Supermarket Self-Service Checkout, Federation University, Australia. Design and model two classes
Why is emotions management important in this job : To what extent do the three people featured in this case study manage their own emotions on the job? How do they accomplish this?
Personal report of public speaking anxiety : Select the self assessment titled "Personal Report of Public Speaking Anxiety." Discuss your results of this assessment.
Exciting experiences for users in digital environment : Consider when creating innovative and exciting experiences for users in a digital environment.
What is the customer segment for this particular product : What is the customer segment for this particular product, line of products, or brand?

Reviews

inf2110703

10/18/2018 12:14:55 AM

Excellent work was done by the expert. Expert explained and answered all the questions correctly and appropriately. Thanks to Experts Mind.com

len2110703

9/11/2018 11:25:48 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. This assignment should take you approximately 20 hours to complete.

len2110703

9/11/2018 11:25:42 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. 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.

len2110703

9/11/2018 11:25:28 PM

Submission and Marking Process - 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: ITECH1400_Assignment_1_YOUR-NAME_YOUR-STUDENT-ID.zip. Obviously replace YOUR-NAME and YOUR-STUDENT-ID) 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.

len2110703

9/11/2018 11:24:36 PM

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

Other Subject Questions & Answers

  How the constitution addressed the complaints

How the Constitution addressed the complaints in the Declaration of Independence? How the Constitution addressed the weaknesses in the Articles of Confederation?

  Describe a recent example of insider trading

In one paragraph supported by your text and other research, describe a recent example of insider trading. Determine whether the case met the elements of insider trading established by the Supreme Court in U.S. vs. O'Hagen, described in the text

  Do you believe america is losing its international power

Do you believe America is losing its international power? Why or why not? Support your belief with at least one scholarly resource.

  Examine the causes of psychopathology

Provide a brief overview of how culture is a factor in determining the expression of psychopathology.Examine the causes of psychopathology using one of the psychological perspectives in the text.Explain the changes in society's perception of psychopa..

  What kind of research design did the authors use

What were the main hypotheses in this study? What kind of research design did the authors use to answer these questions (observational, correlational, experimental)

  Explain to mr. steele the pre-trial process and any motions

Identify all major steps you will take to prepare a defense for Mr. Steele , including investigation of evidence and witnesses, should Mr. Steele be arrested for a felony such as armed robbery.

  How you can use the information in an educational setting

Include the main points from the section you are focusing on and additional ideas for how you can use the information in an educational setting teaching young children.

  Hip hop research paper

Hip hop research paper- Your research paper assignment is to write an 8-10 pg. double-spaced paper (i.e. including work cited page) on the topic of your choice. You must use 5 article sources from the Hip Hop Studies Reader that we have not read

  Changes for how we tackle some of the global issues

What are the implications of these changes for how we tackle some of the global issues.

  Problem on peer discussion responses

Response Guidelines: Read as many of your peers' posts as time allows, and respond to at least two of them. Try to choose posts that have had the fewest.

  Examine the strengths and weaknesses of each technique

Examine the strengths and weaknesses of each technique. Assess the effectiveness of each technique in analyzing your topic.

  How does formative evaluation differ from summative

How does formative evaluation differ from summative evaluation?  How do the two approaches to evaluation conflict with or complement each other?  In what way is formative evaluation related to criterion-referenced measurement

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