I have changed my code tags.
Have you? Looks to me like the code is being treated like text still. When the tags are correct your code will look like code instead of text.
public class Sample {
public Sample() {
this.color = "pretty color";
}
private String color;
}
Note the highlights and formatting.
How will it recognize objects that are created in the tester class
Where in the instructions does it say anything about recognizing objects created in the tester class? According to what I read the plus method is to accept a USMoney object as a parameter, and then create and return a new USMoney object. So if I have a USMoney object as such:
USMoney personalSavings;
and a USMoney object as such:
USMoney personalSpending;
and using the plus method I would be able to see what I am worth in US Cash as such:
USMoney myValueInUSMoney = personalSavings.plus(personalSpending);
in a way that my personalSavings has not been modified, nor has my personalSpending. The USMoney class does not need to know what the test class does with this myValueInUSMoney object. It just has to know how to add the balance of the personalSpending to the balance of the personalSavings and create a new USMoney object using the sum of the personal objects.
public static double plus()
{
}
SHOULD BE
public int plus()
{
}
I think...
What makes you think that? (Not that you are right or wrong) There are valid reasons to make a method static, does this method qualify as static or non-static? Why?