ITEC 120 LAB 12 Back to Lab index page

Bingo!

Write a class to represent a bingo number.

A bingo number, in american bingo, consists of a letter (B, I, N, G, or O) and a number (1 to 75).

VALID BINGO NUMBERS:
If the letter is a B, then then number will be from 1-15.
If the letter is a I, then then number will be from 16-30.
If the letter is a N, then then number will be from 31-45.
If the letter is a G, then then number will be from 46-60.
If the letter is a O, then then number will be from 61-75.

Your class will need:

Then, write a (very short) driver program which instantiates one bingo number object and uses it to generates 7 bingo numbers. Also print them out.