KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > acme > spextra > AddOns


1 package com.acme.spextra;
2
3 import java.lang.*;
4
5 /**
6  * This class is the new class for add-ons to SuperProduct.
7  */

8 public class AddOns {
9
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 }
28
Popular Tags