Question: 3. Choose one method from the MonetaryCoin class and give one paragraph of description in the space below. You can focus on one or two

3. Choose one method from the MonetaryCoin class and give one paragraph of description in the space below. You can focus on one or two of the following areas: 1) functional perspective such as what the method will do; or 2) implementation perspective such as whether the method is polymorphic, or overloaded, etc.

public class MonetaryCoin extends Coin { private int value; public MonetaryCoin(){ value = 0; } public MonetaryCoin(int aValue){ value = aValue; } public int getValue(){ return value; } public String toString(){ String faceName; if (isHeads()) { faceName = "head"; } else { faceName = "tail"; } return "The coin has "+faceName+" and value is "+value+"."; } }

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!