Question: Using Java, create a piggy bank app. For this system you will have two classes named Money and PiggyBank. The money class will contain variables

Using Java, create a piggy bank app. For this system you will have two classes named Money and PiggyBank.
The money class will contain variables such as the string value for "penny", "Nickel", "dime", one dollar etc. A floating value should also be assinged such as 0.05f, 0.10f etc. The string values should correspond with the floating values for example "penny" will equal 0.01f. These two variables should be private as well as have getter and setter methods.
The piggy bank class will utilize the bag implements method and store up to 28 money objects. This class must allow you to remove random or specific money, display if its full or empty, display the current value of the piggybank, and show if the piggy bank has a certain money obect in it.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!