Question: Create a simple Java class for a piggy bank with the following requirements: . This class wil have a header block comment with your name,
Create a simple Java class for a piggy bank with the following requirements: . This class wil have a header block comment with your name, the course and section, as well 2) as a brief description of what the class does. Private attributes for the number of pennies, nickels, dimes, and quarters in the bank. These attributes are not for the value of the coins, but rather how many you have Public methods for adding pennies, nickels, dimes, and quarters, as well as gets to see the number of each coin type (for the adding methods think sets, but that adds the number to the property rather than replacing the value). The class will need to report the bank's balance through a balance method. This will be a simple calculation method. . . . The class ill use good coding conventions for readability including comments describing what each method does with input(s) and output(s) described, and each attribute described by line comments. There will need to be a main program as well that creates and uses one instance of your . piggy bank in a way that demonstrates that each method and attribute works as anticipated
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
