Static Methods and Static Variables

In this lab, you will implement a Dot class, which will represent a two-dimensional circle. It will have both static and non-static instance variables and static and non-static methods. Dots will be scattered randomly on a canvas, and all the dots will have the same color and radius.

This lab will help you learn:

A Visual Lab...

In order to make this lab more interesting, we will be using a Java library called Processing. Processing contains a set of methods that simplify making graphical programs. Specifically, it enables us to easily draw and interact with shapes in a window.

There is no need to be concerned with how the Processing library works. Our focus is on static and non-static variables and methods. You will find all the information you need to implement the Dot class and Lab5 class in the following slides.