01
package com.db4odoc.commitcallbacks;
02
03
public class Car ...{
04
05
private String name;
06
07
private int model;
08
09
private Pilot pilot;
10
11
public Car(String name, int model, Pilot pilot) ...{
12
this.name = name;
13
this.model = model;
14
this.pilot = pilot;
15
}
16
17
public void setModel(int model) ...{
18
this.model = model;
19
}
20
21
public void setPilot(Pilot pilot) ...{
22
this.pilot = pilot;
23
}
24
25
public String toString() ...{
26
return "Car: " + name + " " + model + " Pilot: " + pilot.getName();
27
}
28
}