In this assignment you will program a Java class following the Java standards.
This homework is similar to Homework 2.
This assignment must be submitted to the Moodle submission page for Homework 3 with the name BingoLabel.java by 11:00 PM on Thursday, 2 February.
Your program must be written for the
homework3
package.
You should
use the Java class TestDriver
to test your class.
Implement an ADT with a Java class name BingoLabel
in the package homework3
to represent a label on a Bingo card.
The rules for these labels can be found
in the Wikipedia
article about Bingo.
The BingoLabel
should have properties
“letter” and “number”.
In your BingoLabel
class there should be appropriate
mutator and accessor methods for these properties,
appropriate constructors, and a nice toString
method
for the class.
The Wikipedia article explains the legal combinations of letters and numbers. You should familiarize yourself with the allow letters, numbers, and combinations of the two. (For example, B-17 is not a legal label for a square.)
Your class should throw
the execption
IllegalArgmentException
when its methods are passed
improper parameters; however, your setLetter
method
should accept both lower and upper case letters.