01: package csdl.foo;
02:
03: /**
04: * Main class in stand-alone system example that is tested by test classes TestBar and TestBar2.
05: * <p>
06: * All methods prints their name to the screen when invoked.
07: *
08: * @author Joy M. Agustin
09: * @version $Id: Bar.java,v 1.2 2003/01/25 01:48:57 jagustin Exp $
10: */
11: public class Bar extends Foo {
12:
13: /**
14: * Prints method name to screen then calls methodB(int a)
15: * @return 0
16: */
17: public int methodA() {
18: System.out.println("Bar: methodA");
19: return 0;
20: }
21:
22: /**
23: * Prints method name and parameter types to screen.
24: *
25: * @param a Description of the Parameter
26: * @param b Description of the Parameter
27: */
28: public void methodB(String a, Integer b) {
29: System.out.println("Bar: methodB(String, Integer)");
30: }
31:
32: /**
33: * The main program for the Foo class. It prints out the method name, creates a new instance
34: * of the Foo class, then calls methodA twice.
35: *
36: * @param args The command line arguments
37: */
38: public static void main(String[] args) {
39: System.out.println("Bar: main");
40: Bar bar = new Bar();
41: bar.methodB(1);
42: bar.methodB(2);
43: }
44: }
|