import java.util.*; public class PrizeDB { public PrizeDB() {data = new ArrayList();} protected ArrayList data; /* pre: p != null && p.getName() != null && !p.getName().equals("") && p.getID() > 0 post: forall (Prize other_prize; data'.contains(other_prize) iff data.contains(other_prize) || other_prize.equals(p)) */ public void add(Prize p) throws AddPrizePrecondViolation { int id = p.getId(); if (id <= 0) throw new AddPrizePrecondViolation(); data.add(p); System.out.println(data.size()); } public void delete(int id) {} public void change(int id, Prize p) {} public Prize find(int id) {return null;} }