ITECH1400 - Assignment 1 – Recycling MachineDue Date: 5pm, Friday of Week 7This assignment will test your skills in designing and programming applications to specification and is worth 20% of your...

ITECH1400 - Assignment 1 – Recycling MachineDue Date: 5pm, Friday of Week 7This 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 or you will be in breach of the university plagiarism rules. This assignment should take you approximately 20 hours to complete.Assignment OverviewYou are tasked with creating a text-based program for simulating a Recycling Machine using the Python 3 programming language.The assignment is broken up into four main components:1.)Design and model two classes: RecyclableItem and RecyclingMachine,
2.)Create an activity chart which describes the behaviour of the Recycling Machine system,
3.)Create a computer program that allows a user to enter items that are able to be recycled into a machine. During the process the machine prompts the user for the type of item to be recycled and how many they have to enter. The machine keeps track of the number of each of the different items and keeps track of the total amount to pay the user until they indicate that they are finished. When they stop adding items, print out a receipt and given them the amount of money owing. The receipt should contain the following:a.A list showing how many of each item has deposited and the cost of each item.b.The total amount provided for each itemc.The total money received.
4.)Finally, explain and integrate some code into your Recycling Machine program that keeps track of how many items of each type are in the machine, and, if the machine is full, makes deposits of that item type unavailable. You machine should have at least 4 different products, and allow up to 50 of each product.
Your submission should consist of one document containing the first two parts of the assignment, and three Python scripts that implement the computer program (recyclingmachine.py, recyclableItem.py and main.py).The main.py script runs the main logic of the program and will use instances of the RecyclingMachine and RecyclableItem classes to simulate depositing into a Recycling Machine.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 DesignThink of a product that you can recycle that you might want to be able to deposit into a Recycling Machine, like maybe an empty soft drink can.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 RecyclableItem and write these down in your Assignment_Part_1_ Microsoft Word document, provided for download in the assessment section of your Moodle shell.Next, use the process of abstraction to cut the number of properties back to only ‘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 Item class in the Word document template provided. Your RecyclableItem 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 key properties that you’ve identified.Next we’ll move on to RecyclingMachine class – think about what information the Recycling Machine has to keep track of to allow you to successfully deposit an item to be recycled. There will only really be three key properties that the RecyclingMachine cares about, and the RecyclingMachine class should have the following five methods available:1)A default constructor that takes no arguments and initialises a new object and its properties,2)accept_product(),3)select_product()4)payout(anAmount)5)print_receipt().Fill in the class diagram for the RecyclingMachine class in the Word template, and that’s the first part completed!
Assignment Part 2 Details – Activity FlowchartUsing either the online website https://draw.io (preferred), or the applications Visio or Powerpoint – create an activity diagram of how the program should operate to successfully enter their money, buy one or more products, 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 may be familiar with how a Recycling Machine works, if not then you can always look online Recycling Machine.Don’t worry about taking payment to debit or credit cards, our RecyclingMachine will only provide cash.Once you have completed your activity chart, add it to your assignment template document.Assignment Part 3 Details – Software ImplementationYou 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 RecyclableItem instances so that products which exist can be purchased – in your code you should do the same.Your program does not have to have the facility to add new recyclable items – just define a few and use them as demonstrated below. If the final option of STOP is chosen, the program should print the receipt and ask the user if they want to start again or quit. Example Program OutputBalance: $0.0. Please select a product: (Can, Bottle, Paper, Stop): CanHow many cans do you have?: 3Please place 3 cans into machine.Can acceptedCan acceptedCan acceptedYou added 3 can(s) for $0.20 each. You have $0.6.
Balance: $0.6. Please select a product: (Can, Bottle, Paper): BottleHow many bottles do you have?: 1Please place 1 bottle into machine.Bottle acceptedYou added 1 can(s) for $0.50 each. You now have $1.10.
Please select a product: (Can, Bottle, Paper): STOP
----- Final Receipt -----
3 Can(s)$0.61 Bottle(s) $1.0
Number of items4Amount paid:$1.6
Thank you for recycling at FedUni!
(N)ext customer, or (Q)uit? q>>>
 Part 4 – Code Explanation and UseYou are provided with the following two functions which you should1.Analyse to determine what they do & provide documentation comments for, and2.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!# Function to: ___________________________def get_float(prompt): # ____________________________________ value = float(0.0) # ____________________________________ while True: try: # ____________________________________ value = float(input(prompt)) # ____________________________________ if value print("We don't accept negative money!") continue # ____________________________________ break # ____________________________________ except ValueError: return 0.0 # ____________________________________ return value
# Function to: ___________________________def run(): # ____________________________________ vm = RecyclingMachine() # ____________________________________ next_customer = True # ____________________________________ while next_customer: # ____________________________________ vm.accept_product() # ____________________________________ vm.identify_product() # ____________________________________ vm.print_receipt() # ____________________________________ while True: # ____________________________________ answer = get_str("(N)ext customer, or (Q)uit?") # ____________________________________ answer = answer.upper() # ____________________________________ if answer == "N": # ____________________________________ break elif answer == "Q": # ____________________________________ exit() else: # ____________________________________ print("Invalid Response")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__.zipObviously replace and 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) Moodle.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.Assignment 1 – FedUni Recycling MachineStudent name: Student ID:PartAssessment CriteriaWeightMark1aIdentification of properties of a typical Recycling Machine recycleable item.10 * 0.5 = 5 marks1bApplication of abstraction to identify key properties of a typical Recycling Machine recycleable item as well as creation of a suitable Class Diagram.4 marks1cIdentification of the key properties of a RecyclingMachine as well as creation of a suitable Class Diagram which uses those properties, plus the five method signatures provided.4 marks2Creation 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/branches10 marks3Programming of the product Recycling Machine simulation so that it:i)Creates a small number of items to be recycled instances that may be added to the machine,ii)Accepts selection of an item to recycle to identify it (including refusal to identify products which do not exist),iii)Adds a selected recycleable item to the RecyclingMachine list of items collected,iv)Allows the recycling of multiple products,v)Prints a final receipt of the products purchased, along with the total cost, total paid and any change given.vi)Indicates when the machine is full of items5 + 5 + 5 + 5 + 5 + 5 = 30 marks.i)ii)iiI)iv)v)vi)Total:
4aAnalysis and documentation via code comments of the functions provided.(8 * 0.5) + (14 * 0.5) = 11 marks4bIncorporation of the two functions provided into your main submission so that the program does not crash when an item is provided provided, and also virtually ‘bags up’ the items to be recycled. +1 mark for actually using them.3Deductions•Poor quality•Not fully implemented•Incomplete submissions•Insufficient comments•Poor variable/function namesAssignment total (out of 65 marks)Contribution to grade (out of 20 marks)

Comments:
Dec 18, 2020ITECH1400
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here