Class SuperClass

java.lang.Object
  |
  +--SuperClass

class SuperClass
extends java.lang.Object

SuperClass.java - A super class for the demonstration of inheritance.

Version:
4/5/2000
Author:
Grant William Braught, Dickinson College

Constructor Summary
(package private) SuperClass()
          Default no-arg constructor that initializes the instance data to 0 and increments the number of SuperClass objects in existence.
(package private) SuperClass(int inita, int initb)
          Constructor that provides initial values for the instance data.
 
Method Summary
 int methodOne()
          methodOne
 int methodTwo()
          methodTwo
 java.lang.String toString()
          Return a string representation of the object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SuperClass

SuperClass()
Default no-arg constructor that initializes the instance data to 0 and increments the number of SuperClass objects in existence.

SuperClass

SuperClass(int inita,
           int initb)
Constructor that provides initial values for the instance data.
Parameters:
inita - Initial value for instance data a.
initb - Initial value for instance data b.
Method Detail

methodOne

public int methodOne()
methodOne
Returns:
the sum of a and b.

methodTwo

public int methodTwo()
methodTwo
Returns:
a * b

toString

public java.lang.String toString()
Return a string representation of the object.
Returns:
a string representation of the object.
Overrides:
toString in class java.lang.Object