[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.03,0:00:03.32,Default,,0000,0000,0000,,We just saw that because of Polymorphism, one can write a program that can Dialogue: 0,0:00:03.32,0:00:07.67,Default,,0000,0000,0000,,handle any mix of quiz questions. Let's try that out and develop another Dialogue: 0,0:00:07.67,0:00:11.50,Default,,0000,0000,0000,,question type. A numeric question expects an answer from the user that is a Dialogue: 0,0:00:11.50,0:00:16.34,Default,,0000,0000,0000,,number. For example here we ask what is the area of a circle with radius one. Dialogue: 0,0:00:16.34,0:00:19.33,Default,,0000,0000,0000,,And the answer is of course pi, but that might be hard to enter, and we can't Dialogue: 0,0:00:19.33,0:00:22.37,Default,,0000,0000,0000,,really expect the user to type in the exact value of pi, and as you know, this Dialogue: 0,0:00:22.37,0:00:28.14,Default,,0000,0000,0000,,is not even the exact value, either. It goes on forever. We just want the user Dialogue: 0,0:00:28.14,0:00:33.58,Default,,0000,0000,0000,,to be able to enter, say, 3.14 or 3.14159, depending on how well they remember Dialogue: 0,0:00:33.58,0:00:39.51,Default,,0000,0000,0000,,those digits. Either one of those answers should be fine. In fact, we'll take Dialogue: 0,0:00:39.51,0:00:43.17,Default,,0000,0000,0000,,any answer, that's up to point oh one away, from the answer, that the user Dialogue: 0,0:00:43.17,0:00:48.01,Default,,0000,0000,0000,,provides. In a different numeric question we might use a different tolerance. Dialogue: 0,0:00:48.01,0:00:51.78,Default,,0000,0000,0000,,Your task is to implement this new question type. We've given you the Dialogue: 0,0:00:51.78,0:00:56.29,Default,,0000,0000,0000,,constructor, your job is to provide the set answer method. And the check answer Dialogue: 0,0:00:56.29,0:00:59.97,Default,,0000,0000,0000,,method. And the check answer method, you need to take the tolerance into Dialogue: 0,0:00:59.97,0:01:03.44,Default,,0000,0000,0000,,account, you need to check whether the given number is not too far away from Dialogue: 0,0:01:03.44,0:01:08.34,Default,,0000,0000,0000,,the response. So, technical issue the response is a a string, you need to convert Dialogue: 0,0:01:08.34,0:01:12.74,Default,,0000,0000,0000,,it to a number. And we show you here how to do that. You may need additional Dialogue: 0,0:01:12.74,0:01:16.05,Default,,0000,0000,0000,,instance variables. And then you should put them here. Go ahead, give this a Dialogue: 0,0:01:16.05,0:01:16.54,Default,,0000,0000,0000,,try.