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
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 |
age
int age
firstName
String firstName
lastName
String lastName
shoeSize
double shoeSize
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 tolastNameArg
- a String to set lastName equal toageArg
- an int to set age equal tossArg
- a double to set shoeSize equal to- Since:
- version 4
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