public class Person
extends java.lang.Object
Constructor and Description |
---|
Person(java.lang.String name,
java.awt.Point p1,
java.awt.Point p2)
Creates a new person
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Get the person name
|
java.awt.Point |
getP1()
Get the first point of the rectangle
|
java.awt.Point |
getP2()
Get the second point of the rectangle
|
void |
setName(java.lang.String name)
Set the name of the person
|
void |
setP1(java.awt.Point p1)
Set the first point of the rectangle
|
void |
setP2(java.awt.Point p2)
set the second point of the rectangle
|
public Person(java.lang.String name, java.awt.Point p1, java.awt.Point p2)
name
- name of the personp1
- first point of the rectanglep2
- second point of the rectanglepublic java.lang.String getName()
public void setName(java.lang.String name)
name
- new name for the personpublic java.awt.Point getP1()
public void setP1(java.awt.Point p1)
p1
- first point of the rectanglepublic java.awt.Point getP2()
public void setP2(java.awt.Point p2)
p2
- second point of the rectangle to set