TopNumeric types and Conditionals

Numeric types and Conditionals

I was out of town for this class, so have included screen captures of lectures. Please watch each video, look at the code discussed, read the related sections in the text, and then look at problems in the book.

Video segments

Be sure to open your browser window wide enough that you can see everything.

  1. In this lecture segment, we give some general advice, and then discuss programs involving accessor methods, mutator methods and numbers. Introduction.

    Click on CrossHairs to show the example.

  2. Next we look at some examples that use numbers in a more essential way: Numbers.mp4.

    Click on ClickCounter to show the example.

    Click on MouseMeter to show the example.

  3. In this next lecture, we look at what is necessary in order to drag items around the screen in a natural looking way. Dragging.mp4.

    Click on SimpleDrag to show the example.

    That example didn't give a good solution for dragging. Click on BetterDrag for a better solution.

  4. Finally, we introduce conditional statements and make a couple of attempts to write a program to play a simple game of basketball. Conditionals.mp4

    Basketball: To see the first attempt click on BasketBall to show the example.

    To make our basketball game a bit more exciting, let's add something that is clearly missing from our first version -- a ball. In particular, we would like to change the game so that to score you have to drag the ball into the basket.

    Click on BetterBasketBall to show the example.


TopNumeric types and Conditionals