These exercises are part of the asynchronous component of this course. Material is taught and demonstrated, but at times you are asked to complete one of the exercises to help you master the new concepts.In the repository you are using for this course, look inside the exercises source folder, and you will see assignments organized by name. Before continuing on to the next portion of the asynchronous material, spend some time on the exercise. When you are finished, commit your code so that credit for the exercise can be given.
It is not so important that you get the exercise exactly right. It is important to work through it as best you can before you look at the solution or continue with other work in this module.
Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.
After completing this exercise:
Commit any files you have changed so that you receive credit for your work!
Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.
The book does not include mention of Sedgewick's filledRectangle method. But it is there, and you can find it by pausing after typing the .. Eclipse will then show you possible completions, which will include filledRectangle.
After completing this exercise:
Commit any files you have changed so that you receive credit for your work!
Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.
Do this a step at a time, testing your code. Look at the solution video intermittently, as necessary.
After completing this exercise:
Commit any files you have changed so that you receive credit for your work!
Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.
- By using show(..), the drawing you do is not actually shown between calls to show.
- Instead, the drawing is done in memory, off the screen, which is much faster.
- When you call show(), the work you have done off screen is put on screen all at once.
- The program also pauses for the specified time, usually 10 to 50 milliseconds. Pausing allows your computer to do something else for a while, which will make your computer feel more responsive in the other applications that are running.
- As a hint, think about keeping some history of where the mouse has been.
- You can then have the ball go to locations in the mouse's past.
After completing this exercise:
Commit any files you have changed so that you receive credit for your work!
Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.
In this exercise you will print out the frequency associated with a pitch, and with the pitch 7 chromatic steps above that pitch.
After completing this exercise:
Commit any files you have changed so that you receive credit for your work!
Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.
After completing this exercise:
Commit any files you have changed so that you receive credit for your work!