1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| package proxy;
public class Pursuer implements Policy { private SchoolGirl girl;
public Pursuer(SchoolGirl girl) { this.girl = girl; }
public void giveFlowers() { System.out.println("give " + girl.getName() + " flowers."); }
public void giveTickets() { System.out.println("give " + girl.getName() + " tickets."); }
public void drinkMoreWater() { System.out.println("persuade " + girl.getName() + " drink more water."); } }
|