3 public class Person
extends JPanel
implements Comparable
<Person
> {
4 private Firstname firstname
;
10 Person(Firstname firstname
) {
11 setFirstname(firstname
);
14 public void setFirstname(Firstname firstname
) {
15 this.firstname
= firstname
;
18 public Firstname
getFirstname() {
22 public void setOrigin(Origin origin
) {
26 public Origin
getOrigin() {
30 public void setPersonSize(Size size
) {
34 public Size
getPersonSize() {
38 public void setWeight(Weight weight
) {
42 public Weight
getWeight() {
46 public void setEye(Eye eye
) {
55 public int compareTo(Person person
) {
56 return this.firstname
.compareTo(person
.getFirstname()) + this.origin
.compareTo(person
.getOrigin())
57 + this.size
.compareTo(person
.getPersonSize()) + this.weight
.compareTo(person
.getWeight())
58 + this.eye
.compareTo(person
.getEye());