Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void closeAuction() {
- Scanner y = new Scanner(System.in);
- System.out.printf("%-25s %s", "Enter sale ID:", "");
- String SaleIdInput = y.next();
- for (Sale s : arrayL) {
- if (SaleIdInput.equals(s.getsaleID())) {
- if (s instanceof Auction) {
- ((Auction) s).closeAuction();
- System.out.println(
- "Auction :" + s.getsaleID() + " has ended. The property has been:" + s.getPropertyStatus());
- return;
- } else {
- System.out.println("PropertyID: " + s.getsaleID() + " is not an auction");
- }
- }
- mainMenu();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement