Advertisement
mnaufaldillah

Bid Tugas 3

Oct 24th, 2020
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.89 KB | None | 0 0
  1.  
  2. /**
  3.  * A class that models an auction bid.
  4.  * It contains reference to the Person bidding and the amount bid.
  5.  *
  6.  * @author Muhammad Naufaldillah
  7.  * @version 22 October 2020
  8.  */
  9. public class Bid
  10. {
  11.     // The person making the bid
  12.     private final Person bidder;
  13.     // The value of the bid. This could be a large number so
  14.     // the long type has been used.
  15.     private final long value;
  16.    
  17.     /**
  18.      * Create a bid.
  19.      * @param bidder Who is bidding for the lot.
  20.      * @param value The value of the bid
  21.      */
  22.     public Bid(Person bidder, long value)
  23.     {
  24.         this.bidder = bidder;
  25.         this.value = value;
  26.     }
  27.    
  28.     /**
  29.      * @return The bidder.
  30.      */
  31.     public Person getBidder()
  32.     {
  33.         return bidder;
  34.     }
  35.    
  36.     /**
  37.      * @return The value of the bid
  38.      */
  39.     public long getValue()
  40.     {
  41.         return value;
  42.     }
  43. }
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement