Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
866
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1.         auctionlist.add(new Auction(auctionlist.size()+1, dog));
  2.         System.out.println("Auction for " + dog.getName() + " has begun");
  3.     }
  4.  
  5.  
  6.  
  7.     public void listAuctions() {
  8.         if (auctionlist.size() == 0) {
  9.             System.out.println("Error: no auctions currently in progress");
  10.             return;
  11.         }
  12.         for (int i = 0; i < auctionlist.size(); i++) {
  13.             String dogName = auctionlist.get(i).getDog().getName();
  14.             System.out.printf("Auction #%d: %s. Top bids: [", auctionlist.size()+1, dogName);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement