Back to project page MobileDev_beginner.
The source code is released under:
This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...
If you think the Android project MobileDev_beginner listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.corruptor; /*from www . j a va 2s . c o m*/ /****************************************************************************** * Filename : Menu.java * Author : E&R * Date : 18-Nov-2011 * Description : Displays the main menu. ******************************************************************************/ import java.util.Scanner; public class Menu { /** * */ private static int choice; private static Scanner scanner = new Scanner(System.in) ; public Menu() { choice = 0; } public static int fnMainMenu(){ fnDrawBanner(); System.out.println("\t\t\tMain Menu"); System.out.println("\t\t\t========="); /* * Display Main Menu Options */ System.out.println("\t\t1. Car Info"); System.out.println("\t\t2. Customer Info"); System.out.println("\t\t3. Booking Info"); System.out.println("\t\t4. Reports"); System.out.println("\t\t5. Exit"); System.out.println("\t\t Enter Choice (1-5)"); choice = scanner.nextInt(); return choice; } public static int fnCarMaintMenu(){ fnDrawBanner(); System.out.println("\t\tCar Info Menu"); System.out.println("\t\t==========================="); /* * Display Car Info Menu Options */ System.out.println("\t\t1. Add Car"); System.out.println("\t\t2. Update Car Rate"); System.out.println("\t\t3. Update Car Status"); System.out.println("\t\t4. List All Cars"); System.out.println("\t\t5. Goto Main Menu"); System.out.println("\t\t Enter Choice (1-5)"); choice = scanner.nextInt(); return choice; } public static int fnCustMaintMenu(){ fnDrawBanner(); System.out.println("\t\tCustomer Info Menu"); System.out.println("\t\t========================="); /* * Display Customer Info Menu Options */ System.out.println("\t\t1. Add Customer"); System.out.println("\t\t2. Update Customer"); System.out.println("\t\t3. List All Customers"); System.out.println("\t\t4. Goto Main Menu"); System.out.println("\t\t Enter Choice (1-4)"); choice = scanner.nextInt(); return choice; } public static int fnBookingMaintMenu(){ fnDrawBanner(); System.out.println("\t\tBooking Info Menu"); System.out.println("\t\t===================================="); /* * Display Booking Info Menu Options */ System.out.println("\t\t1. Add Booking"); System.out.println("\t\t2. Update Booking Date"); System.out.println("\t\t3. Update Booking Car"); System.out.println("\t\t4. Update Booking Payment"); System.out.println("\t\t5. Goto Main Menu"); System.out.println("\t\t Enter Choice (1-5)"); choice = scanner.nextInt(); return choice; } public static int fnReportsMenu(){ fnDrawBanner(); System.out.println("\t\tReports Menu"); System.out.println("\t\t==========================="); /* * Display Reports Menu Options */ System.out.println("\t\t1. Car Report"); System.out.println("\t\t2. Customer Report"); System.out.println("\t\t3. Income Reports"); System.out.println("\t\t4. Goto Main Menu"); System.out.println("\t\t Enter Choice (1-4)"); choice = scanner.nextInt(); return choice; } private static void fnDrawBanner(){ System.out.println("\n\n\t\t +==================+"); System.out.println("\t\t | Car Rental System |"); System.out.println("\t\t +==================+"); } } /****************************************************************************** * End of Menu.java ******************************************************************************/