Learning objectives

 

In this unit you will learn:

-   about the Board class and its properties

-   how to create a Board object and invoke its methods

-   how to create a simple animation using a Board object

 

 

 

 

In the previous unit we looked at how we can use a Scanner object to obtain input from the user.  We came to recognize that a class, such as Scanner or System, differs from a data type such as int in that we can invoke methods on an object, but not on a simple data type.  A method can perform a much more complex task than an arithmetic operator can.  In this unit, we introduce a new class called Board, which gives us a graphical representation of a 2-dimensional grid.  Method invocations on a Board object will come to life because the output is graphical.  But before you can start using the Board class, you will need to set it up in your environment.  It will only be a few minutes before you can work with it.