Identification of properties of typical supermarket product

Assignment Help C/C++ Programming
Reference no: EM131956907

1a Identification of properties of a typical supermarket Product.

1b Application of abstraction to identify key properties of a typical supermarket Product as well as creation of a suitable Class Diagram.

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.

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

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.

4a Analysis and documentation via code comments of the two functions provided.

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.

Assignment Part 1 Details - Class Design
Insert your list/table of possible product properties here...
Product Properties (All)

Product Properties (Key)

Complete the class diagram of your final Product
Product Class Diagram

CheckoutRegister Class Diagram

Assignment Part 2 - Activity Flowchart
Insert your activity flowchart of the supermarket checkout process here... If your flowchart is large then place it on the following page.

Assignment Part 3 - Software Implementation
Do not place your code here - provide the code as separate .py files submitted with this document.

Assignment Part 4 - Code Explanation and Use
Update the below code to insert comments describing what the code is doing - for each line starting with a hash symbol (#) you should write your code comments after the hash. You may add a second line of comments if you require more space.

# Function to: ___________________________
defget_float(prompt):

# ____________________________________
value =float(0.0)

# ____________________________________
whileTrue:
try:
# ____________________________________
value = float(input(prompt))

# ____________________________________
if value <0.0:
print("We don't accept negative money!")
continue

# ____________________________________
break

# ____________________________________
exceptValueError:
print('Please enter a valid floating point value.')

# ____________________________________
return value


# Function to: ___________________________
defbag_products(product_list):

# ____________________________________
bag_list=[]
non_bagged_items=[]
MAX_BAG_WEIGHT =5.0

# ____________________________________
for product inproduct_list:


# ____________________________________
ifproduct.weight> MAX_BAG_WEIGHT:
product_list.remove(product)
non_bagged_items.append(product)

# ____________________________________
current_bag_contents=[]
current_bag_weight=0.0

# ____________________________________
whilelen(product_list)>0:

# ____________________________________
temp_product=product_list[0]
product_list.remove(temp_product)

# ____________________________________
ifcurrent_bag_weight+temp_product.weight< MAX_BAG_WEIGHT:

# ____________________________________
current_bag_contents.append(temp_product)
current_bag_weight+=temp_product.weight

# ____________________________________
if(len(product_list)==0):
bag_list.append(current_bag_contents)

# ____________________________________
else:
bag_list.append(current_bag_contents)

# ____________________________________
current_bag_contents=[]
current_bag_weight=0.0

# ____________________________________
for index, bag in enumerate(bag_list):
output ='Bag '+str(index +1)+' contains: '

# ____________________________________
for product in bag:
output += product.name +'\t'
print(output,'\n')

# ____________________________________
if(len(non_bagged_items)>0):
output ='Non-bagged items: '

# ____________________________________
for item innon_bagged_items:
output += item +'\t'
print(output,'\n')

Attachment:- Assignment.rar

Verified Expert

I purposed a solution for self-checkout at supermarket. By the implementation of this solution for the supermarket, customer can proceed hassle-free for there bill payment. Customer just need to scan there all products at bill-desk, by the results they get final payment due to pay on screen. Now he/she has to enter amount to be paid. On the successful transaction customer can proceed for another checkout or else they can leave. self- checkout make faster and easier way to be dealt at supermarket place.

Reference no: EM131956907

Questions Cloud

Consolidated the loans into one amortizing loan : You consolidated the loans into one amortizing loan, which has an annual interest rate of 3% (APR).
Determining training and recruiting needs : Summarize in 350 to 525 words why the questions in your survey will be helpful in determining training and recruiting needs if talent is not able.
Value an internship opportunity : A student is trying to value an internship opportunity for the upcoming summer.
Flow of money coming out of each market-sector : In the circular-flow diagram of the economy, the flow of money into each market or sector is always equal to the flow of money coming out of each market.
Identification of properties of typical supermarket product : ITECH1400 - Assignment 1 – Supermarket Self-Service Checkout - Identification of properties of a typical supermarket Product
Explain why a central bank cannot control both aggregate : Briefly explain why a Central Bank cannot control both aggregate reserves and short-term (overnight) interest rate.
Career path of a marketing consultant : What economics concepts are applicable to the career path of a Marketing consultant? Name and describe at least two economic concepts
What is the current market-to-book ratio : What is the current market-to-book ratio? What is the NPV of this investment? Does market value dilution occur here?
How do you want the lighting in your world to feel : How do you want the lighting in your world to feel? What sounds are we hearing in this world throughout the play? Why did the playwright write the play?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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