So currently I coded a program where it displays seconds from midnight. However, I did this wrong and instead of doing
I'm only supposed to use private int secondsFromMidnight and then implement every constructor and every method in Time2 in terms of secondsFromMidnight, not hours minutes, and seconds. Though there will still be parameters called hours, minutes, and seconds. Just the instance variable will be secondsFromMidnight. I'm having trouble changing from the 3 int into just 1 int called secondsfromMidnight. This is my code so far (note: I've excluded the
test class)
Any suggestions or help is appreciated, thank you