getSalesTotal() and getSalesCount() have been declared as double so they must return some value.
Declare them void if you do not wish to return any value from these methods
stephen84s
Nearly a Posting Virtuoso
1,443 posts since Jul 2007
Reputation Points: 668
Solved Threads: 154
public double getSalesTotal(double salesTotal) {
salesTotal = purchaseTotal;
}
You got yourself quite confused about get methods. You don't need to pass in the value if the purpose of the method is to get it! And setting the value of a parameter like that doesn't achieve anything anyway.
A typical get method looks like this example:
class Person {
private String name;
public String getName() {
return name;
}
...
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073