March 2002
Intermediate to advanced
496 pages
8h 51m
English
| SOLUTION 3.1 | Your solution should look something like Figure B.2.
Figure B.2. This ShellAsRocket class relies on fireworks physics that can model a shell's apogee and “thrust” from its muzzle velocity.
|
| SOLUTION 3.2 | One set of solutions for the missing methods is:
package com.oozinoz.applications; import javax.swing.table.*; import com.oozinoz.fireworks.*; public class RocketTable extends AbstractTableModel { protected Rocket[] rockets; protected String[] columnNames = new String[] { "Name", "Price", "Apogee" }; public RocketTable(Rocket[] rockets) { this.rockets = rockets; } public int getColumnCount() { return columnNames.length; ... |
Read now
Unlock full access