Programming and Problem Solving with Java

(やまだぃちぅ) #1

320


11.Conduct a first scenario walk-through of the CRC cards from Exercise 10, for
recording a training session, and indicate any additional classes or responsibil-
ities that you find.
12.Brainstorm a list of additional scenarios for the problem given in Exercises
8–11.
13.Use the scenario in Exercise 11 as the basis for the first test case in a test plan
for the application.
14.Declare a package named somePackagewith headings for the public classes
AddressLabeland PrintLabel.
15.How does Java manage to put all the pieces of a package together?

Programming Problems


1.Use the CRC card process to design a game application that simulates a
roulette table. The roulette table has 36 numbers (1–36) that are arranged in
three columns of 12 rows. The first row has the numbers 1 through 3, the
second row contains 4 through 6, and so on. The number 0 is outside of the
table of numbers. The numbers in the table are colored red and black (0 is
green). The red numbers are 1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34,
and 36. The other half of the numbers are black. In a simplified set of rules,
players can bet on an individual number (including 0), the red numbers, the
black numbers, the even numbers, the odd numbers, the numbers 1–18, the
numbers 19–36, and any of the columns or rows in the table.

T


E


A


M


F


L


Y


Team-Fly®

Free download pdf