Right now, the code that makes the binary clock work is spread over both BinaryClock and TimePanel. Clean this up:
The current BinaryClock class mostly deals with drawing the window frame and setting options. Rename it to something that makes sense, and move the code that deals with updating/displaying the clock out of it.
The current TimePanel class is actually the binary clock. Rename it to BinaryClock and bring all the code it needs inside of it.
Your end goal is to have a BinaryClock that you can stick into any window and have it Just Work. And if you want to add other clock faces, this organization will make it way easier to do.
Right now, the code that makes the binary clock work is spread over both
BinaryClock
andTimePanel
. Clean this up:BinaryClock
class mostly deals with drawing the window frame and setting options. Rename it to something that makes sense, and move the code that deals with updating/displaying the clock out of it.TimePanel
class is actually the binary clock. Rename it toBinaryClock
and bring all the code it needs inside of it.Your end goal is to have a
BinaryClock
that you can stick into any window and have it Just Work. And if you want to add other clock faces, this organization will make it way easier to do.200 XP