Explain and integrate some code into your recycling machine

Assignment Help Other Subject
Reference no: EM132202591

Assignment 1 - Recycling Machine

Assignment Overview

You are tasked with creating a text-based program for simulating a Recycling Machineusing the Python 3 programming language.
The assignment is broken up into four main components:

1.) Design and model two classes:RecyclableItemand RecyclingMachine,

2.) Create an activity chart which describes the behaviour of the Recycling Machine system,

3.) Create acomputer 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 itemsand 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 listshowing how many of each item has deposited and the cost of each item.
b. The total amount provided for each item
c. 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 RecyclingMachineand RecyclableItemclasses 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 Design
Think of a product that you can recycle that you might want to be able to deposit into aRecycling 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 tengeneral properties of aRecyclableItemand write these down in your Assignment_Part_1_<YOUR_STUDENT_ID>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 RecyclableItemclass 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 RecyclingMachineclass 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 Flowchart

Using either the online website draw, 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 onlineRecycling 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 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 RecyclableIteminstances 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.

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 Template.zip

Verified Expert

The assignment is a python 3.6 program to stimulate the working of a recycling machine. The program demonstrate the concept of object oriented programming and uses loop and conditional structure and list to store the data. the assignment also show the activity diagram for the logic of the problem and UML diagram for classes showing various properties and methods used in the classes.

Reference no: EM132202591

Questions Cloud

Weighted average implied by two outstanding debt issues : Assume that the overall cost of debt is the weighted average implied by two outstanding debt issues. What is the company’s wacc?
The importance of traditions in all cultures : Describe your favourite family tradition. (Ukrainian Christmas) Do you know why this practice is important to this culture?
Modular arrangement with marge stevens : The office is beautiful. You work in a modular arrangement with Marge Stevens, administrative assistant in purchasing,
Develop an architectural internetworking design : MN503 - Overview of Internetworking - Explain human factors in achieving business and technical goals through planning and design
Explain and integrate some code into your recycling machine : Create an activity chart which describes the behaviour of the Recycling Machine system - Design and model two classes:RecyclableItemand RecyclingMachine
Organization without the other two : Are innovation, creativity, and sustainability related? Explain.
Eliminating the use of paper in the workplace : Technology is slowly eliminating the use of paper in the workplace. What are some examples where applications have moved us from a paper free workplace?
How can the company overcome this resistance : Should the company go ahead with the move to Mexico or try one more time to work things out in the Oconomo facility?
Which applicant should be hired : a. What is the average waiting time a workman would spend in the system under each applicant? b. Which applicant should be hired?

Reviews

Write a Review

Other Subject Questions & Answers

  Aim of the several varieties of the argument from evil

The object of faith, according to Kierkegaard, is the: The fact that the world seems to have a purposive order serves as a premise in the: The aim of the several varieties of the argument from evil is

  Discuss health care organization profile

In the role of a health care manager, for the final project you will develop and write a comprehensive marketing and communication plan for your fictitious.

  English speakers face in united states

What challenges and opportunities do non-English speakers face in the United States? In schools? In the workplace or workforce? In other everyday environments?

  Think of someone real or fictional whom some people regard

Think of someone real or fictional whom some people regard as a "hero" for helping others, stopping something bad or evil, and so forth.

  Discuss at least three specific implications for curriculum

From the e-Activity, consider the external influences of a regional accrediting body on a school's curricula. Discuss at least three specific implications for curriculum design that are included in the regional accrediting body's standards documen..

  Research conway game of life

You are required to research Conway's Game of Life, and produce a short academic paper (two to three pages) on this topic that would be suitable for publication in an appropriate professional magazine or journal. Ensure you include your references..

  Applying theory: environmental issues

Applying Theory: Environmental Issues

  Write research summary that use quantitative research design

Write one research summary that uses a quantitative research design. Write one research summary that uses a qualitative research design.

  Re-examine the six rules of creating synergy

Reexamine the six rules of creating synergy. Why is it critical that all members of a team understand and enact all the various rules?

  What differences do you find among the firms

What differences do you find among the three firms? For example, do some tailor their message for different stakeholders? Are some firms more creative.

  Research and identify past and present and future trends

Identify and explain current and future issues facing correctional and court administrators in addressing and managing potential human service needs.

  Define the legal and ethical implications

employee at a fictional company and prepare an executive memo pertaining to the legal and ethical implications

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