equals method - how to override
I need help on to override the equals method. I have everything working except for the equals method. The equals method that I currently have is not giving me the correct answer. I can not seem to figure out what could be the problem. My Class: package myclasses; public class Currency { private int dollars, cents; public Currency() { dollars = 0; cents = 0; } public Currency(int d, int c) { this.dollars = d; this.cents = c; setCents(cents); } public int getDollars() { return dollars; } public int getCents() { return cents; } private void setDollars(int dollars) { this.dollars = dollars; }