AUCTION Untuk membuat sistem lelang (Auction) menggunakan empat class, yaitu : Person Bid Lot Auction Berikut adalah souce code yang digunakan : Person /** * Maintain details of someone who participates in an auction. * @author Nitama Nurlingga Yotifa. * @version 20181007 */ public class Person { // The name of this person. private final String name; /** * Create a new person with the given name. * @param name The person's name. */ public Person(String name) { this.name = name; } /** * @return The person's name. */ public String getName() { return name; } } Bid /** * A class that models an auction bid. * It contains a reference to the Person bidding and the amount bid. * * @author Nitama Nurlingga Yotifa. * @version 20181007 */ public class Bid { // The person making the bid. private final Per...
Komentar
Posting Komentar