Veilingsysteem

Log in om je oplossingen te testen.
import java.util.ArrayList;


public class Auction
{
// The list of Lots in this auction.
private ArrayList<Lot> lots;
// The number that will be given to the next lot entered
// into this auction.
private int nextLotNumber;

/**
* Create a new auction.
*/
public Auction()
{
lots = new ArrayList<>();
nextLotNumber = 1;
}

/**
* Enter a new lot into the auction.
* @param description A description of the lot.
*/
public void enterLot(String description)
{
lots.add(new Lot(nextLotNumber, description));
nextLotNumber++;
}

/**
* Show the full list of lots in this auction.
*/
public void showLots()
{
for(Lot lot : lots) {
Je kunt zo vaak indienen als je wenst. Er wordt enkel rekening gehouden met je laatst ingediende oplossing.
Log in om je oplossingen te testen.