// LANDSCAPE GARDENING QUOTE APPLICATION CLASS // Frans Coenen // University of Liverpool // 18 April 2013 import java.util.*; class LandsGardQuoteApp { // ------------------- FIELDS ------------------------ // Create instance of Scanner class private static Scanner input = new Scanner(System.in); // ------------------ METHODS ------------------------ /** Main method to output menu, allow fopr input of selector and processing of selector. */ public static void main(String[] args) { // Create an instance of the class LansGardQuote LandsGardQuote newLGQ = new LandsGardQuote(); // Menu loop while (true) { // Output menu System.out.println("---------------------------------------------------"); System.out.println("Select one of the following options"); System.out.println("\t(1) Prepare new quote"); System.out.println("\t(2) Load and view existing quote"); System.out.println("\t(3) Exit"); System.out.println("---------------------------------------------------"); // Get selection int selector = input.nextInt(); // Case statement switch (selector) { case (1) : newLGQ.prepareAnewQuote(); break; case (2) : newLGQ.viewExistingQuote(); break; case (3) : System.exit(0); break; default : System.out.println("ERROR 1: Unrecognised menu option \"" + selector + "\"!"); } } } }