Class Person

java.lang.Object
  |
  +--Person

public class Person
extends Object

A Person with name, age, and shoe size.

Version:
Feb. 10, 2001, version 3
Author:
Stephen Bloch

Field Summary
(package private)  int age
           
(package private)  String firstName
           
(package private)  String lastName
           
(package private)  double shoeSize
           
 
Constructor Summary
Person()
           
 
Method Summary
(package private)  void setInformation(String firstNameArg, String lastNameArg, int ageArg, double ssArg)
          Set all the information about a Person.
(package private) static void test()
          Where we put all the test cases.
 String toString()
          Format all the information about a Person in a String.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

age

int age

firstName

String firstName

lastName

String lastName

shoeSize

double shoeSize
Constructor Detail

Person

public Person()
Method Detail

setInformation

void setInformation(String firstNameArg,
                    String lastNameArg,
                    int ageArg,
                    double ssArg)
Set all the information about a Person.
Parameters:
firstNameArg - a String to set firstName equal to
lastNameArg - a String to set lastName equal to
ageArg - an int to set age equal to
ssArg - a double to set shoeSize equal to
Since:
version 3

test

static void test()
Where we put all the test cases.
Since:
version 1

toString

public String toString()
Format all the information about a Person in a String.
Overrides:
toString in class Object
Returns:
a String of the form "(name) (name), (age) years old with size (shoe-size) shoes"
Since:
version 2


Generated by BlueJ