Question

In: Computer Science

Think of a product that you can recycle that you might want to be able to...

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

Solutions

Expert Solution

The class diagram for Recycling Machine and Recycle products are as follows -

properties of recycling products are -

  • Size
  • no of items
  • deposit value
  • product ID
  • product name
  • product type
  • length
  • width
  • height
  • batch

properties which is used for abstraction is -

  • Size
  • no of items
  • deposit value

The class diagram for Recycling Machine and Recycling Products are -

The class Recycling Machine is used as a abstract class which can use recyclable and non-recyclable material,which can be identified by the method (function) accept_product(), then the process goes to select_product() which can do the recycling process,before doing this process payout(Amount). The payment will be done from the user side to start the process.Finally the receipt will be printed for the recycled item.


Related Solutions

Suppose you want have a coin that you think might not be exactly fair, that is...
Suppose you want have a coin that you think might not be exactly fair, that is the probability of a head might be slightly different from 0.5. You would like to produce a 95% confidence interval for p, the true probability of a head. You decide that you would like the margin of error for your interval to be plus or minus 0.001 (that is plus or minus 0.1%). How many times, n, do you need to toss the coin...
For this discussion I'd like you to think about when you might have been able to...
For this discussion I'd like you to think about when you might have been able to prepare and analyze variances in the past. While you probably haven't had experience developing standards for materials and labor and comparing with actual to compute variances, you have all encountered situations where you had to spend more or less than you expected (we will use this as standard) or where efficiencies and usage was more or less than planned. What are some of your...
I want you to choose a product that is currently being sold and think of a...
I want you to choose a product that is currently being sold and think of a way that you can make it better. You need to provide the following: Name of the product Description of the product Visual of the product List your enhancement (s) Explanation as to why your "enhancement (s)" will make the current product more attractive.
"The fewer the uncollectible accounts, the better." Can you think of instances where this might not...
"The fewer the uncollectible accounts, the better." Can you think of instances where this might not be the case? Support your points with an example of why fewer uncollectible accounts may not be better for business.
1. We want to test that the true proportion of American's that recycle is greater than...
1. We want to test that the true proportion of American's that recycle is greater than 40%. What type of test should we use? A.Two sample z-test B.Single sample t-test C.Single sample z-test D. ANOVA 2.How large does a contingency table need to be for statistical analysis? at least 2 rows, 2 columns (2x2) at least 2x3 at least 4x2 at least 10x10 3.To use regression analysis, the data type for the variables that are required are A.Both discrete B....
You think that you will be able to deposit $5,500 at the end of each of...
You think that you will be able to deposit $5,500 at the end of each of the next five years in a bank account paying six percent interest. You currently have $4,416 in the account. How much will you have in six years if you make no further deposits? Select one: a. $39,128.43 b. $1,212.00 c. $11,599.01 d. $40,541.65 e. $44,160.25
What do you think might be the most important factor with retirement planning? Can you share...
What do you think might be the most important factor with retirement planning? Can you share your planning right now if you have any? For example do you have an employer 401K or do you contribute to an IRA? If not have not start your retirement planning, what have you learn from this week's reading and module?
What resources might you be able to offer a dying patient?
What resources might you be able to offer a dying patient?
solve these question by financial concepts ? 3.     You think that you will be able to...
solve these question by financial concepts ? 3.     You think that you will be able to deposit SR4000 at the end of each of the next (3) years in a bank account paying 8% rate of return. Ypu currently have SR7000 in the account. How much will you have in (3) years? In (4) years? 4.     If a nurse deposits $1,000 today in a bank account and the rate of return is compounded annually at 12 percent, what will be...
From the list of Virchow's triad can you think what risk factors might be responsible for...
From the list of Virchow's triad can you think what risk factors might be responsible for (i) deep vein thrombosis following surgery (ii) coronary artery thrombosis and (iii) thrombosis of a cerebral artery leading to stroke.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT