01: package com.acme.spextra;
02:
03: import java.lang.*;
04:
05: /**
06: * This class is the new class for add-ons to SuperProduct.
07: */
08: public class AddOns {
09:
10: /** Default constructor. */
11: public AddOns() {
12: }
13:
14: /**
15: * Switch SuperProduct to hyperdrive.
16: *
17: * @param warpSpeed How fast to go.
18: * @return If successful, return true.
19: */
20: public boolean hyperdrive(int warpSpeed) {
21: if (warpSpeed < 8)
22: return true;
23: else
24: return false; // "The engine's canna handle it, cap'n!"
25: }
26:
27: }
|