The Watchmaker Download

Christina Cacioppo

classes, debugging, code composition Idea sketch


Introduction

Centuries ago, all watches were made by hand. Now, most watches are made in factories, and modern-day watchmakers repair, rather than make, watches.

The same will be true for this activity: we're going to give you the parts of a watch, but – you'll notice – it doesn't tell time correctly.

Why doesn't this watch work? It's up to you to debug the program and make the watch function again.


Task

The watch is split across two classes: Watchmaker and Watch.

Your first challenge is to figure out how those files work together. You might get a sense by reading through them, but that can be pretty hard. Often, it's easier to ask the computer to help. You can do that in a few ways: run the program with different inputs, watching how the output changes, or use print statements to reveal variables' value at different points of the program.

The best debugging advice is similar to the best programming advice: just try something – whatever makes sense to you – and let the information you get back guide your next move.


Starter code

class Watchmaker{
	
}

class Watch{
	
}