01: package com.db4o.f1.chapter3;
02:
03: public class Pilot {
04: private String name;
05: private int points;
06:
07: public Pilot(String name, int points) {
08: this .name = name;
09: this .points = points;
10: }
11:
12: public int getPoints() {
13: return points;
14: }
15:
16: public void addPoints(int points) {
17: this .points += points;
18: }
19:
20: public String getName() {
21: return name;
22: }
23:
24: public String toString() {
25: return name + "/" + points;
26: }
27: }
|