Class Person

java.lang.Object
  |
  +--Person

public class Person
extends Object

A Person with name, age, and shoe size.

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

Field Summary
(package private)  int age
           
(package private)  String firstName
           
(package private)  String lastName
           
(package private)  double shoeSize
           
 
Constructor Summary
(package private) Person(String firstNameArg, String lastNameArg, int ageArg, double ssArg)
          Constructor for a Person (sets all the information, but is called automatically every time a Person is created).
 
Method Summary
(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

Person(String firstNameArg,
       String lastNameArg,
       int ageArg,
       double ssArg)
Constructor for a Person (sets all the information, but is called automatically every time a Person is created).
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 4
Method Detail

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