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,444 posts since Jul 2007
Reputation Points: 668
Solved Threads: 156
Skill Endorsements: 10
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
... trying to help
8,516 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,455
Skill Endorsements: 30