Skip to content

Instantly share code, notes, and snippets.

Created November 28, 2012 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4158910 to your computer and use it in GitHub Desktop.
Save anonymous/4158910 to your computer and use it in GitHub Desktop.
Book
public class SerendipitityBooksellers {
public static void main(String[] args) {
int choice = 0;
System.out.println("Serendipidy Booksellers\n");
System.out.println("Main Menu\n");
System.out.println("1. Cashier Module");
System.out.println("2. Inventory Database Module");
System.out.println("3. Report Module");
System.out.println("4. Exit\n");
System.out.println("Enter Your Choice: ");
Scanner keyboard = new Scanner(System.in);
choice = keyboard.nextInt();
if (choice>4 || choice<0)
{
System.out.println("Please select a menu option from 1-4");
System.out.println("Enter Your Choice: ");
choice = keyboard.nextInt();
}else
{
switch(choice)
{
case 1: cashier();
break;
case 2: invMenu();
break;
case 3: reports();
break;
case 4: System.exit(0);
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment