Assignment 102: Keychains for Sale for Real

Code

    /// Name: Ryan McAteer
    /// Period: 5
    /// Program Name: Keychains for Sale for Real
    /// File Name: Assignment102.java
    /// Date Finished: 3/29/16
    
import java.util.Scanner;
import java.util.InputMismatchException;

public class Assignment102
{
	static int keyChains = 0;
	static Scanner keyboard = new Scanner(System.in);
	public static void main( String[] args )
	{
		System.out.println("Welcome to the keychain store!!!\n");

		int choice = 0;
		do
		{
			showMenu();

			do choice = askChoice();
			while (choice==0);

			if (choice == 1) addKey();
			if (choice == 2) removeKey();
			if (choice == 3) viewOrder();
		}
		while (choice!=4);

		checkout();
	}

	public static void showMenu()
	{
		System.out.println("1. Add Keychains to Order");
		System.out.println("2. Remove Keychains from Order");
		System.out.println("3. View Current Order");
		System.out.println("4. Checkout\n");
	}

	public static int askChoice()
	{
		int choice = 0;
		System.out.print("Enter your choice: ");
		try
		{
			choice = keyboard.nextInt();
		}
		catch (InputMismatchException e)
		{
			choice = 0;
			System.out.println("WRONG INPUT!!!\n");
		}
		if (choice < 1 || choice > 4) choice = 0;

		return choice;
	}

	public static void addKey()
	{
		displayAmount();
		System.out.print("How many to add? ");
		try
		{
			int add = keyboard.nextInt();
			if (add>0)
			{
				keyChains += add;
				System.out.println("You now have "+keyChains+" keychains. \n");
			}
			else System.out.println("WRONG INPUT!!!\n");
		}
		catch (InputMismatchException e)
		{
			System.out.println("WRONG INPUT!!!\n");
		}
	}
	public static void removeKey()
	{
		displayAmount();
		System.out.print("How many to remove? ");
		try
		{
			int add = keyboard.nextInt();
			if (add>0 && add<= keyChains)
			{
				keyChains -= add;
				System.out.println("You now have "+keyChains+" keychains. \n");
			}
			else System.out.println("WRONG INPUT!!!\n");
		}
		catch (InputMismatchException e)
		{
			System.out.println("WRONG INPUT!!!\n");
		}
	}
	public static void viewOrder()
	{
		displayAmount();
		System.out.println("\nKeychains each cost 7$.");
		System.out.println("Total cost is "+7*keyChains+"$.\n");
	}
	public static void checkout()
	{
		System.out.println("\nCHECKOUT\n");
		System.out.print("What is your name? ");
		String name = keyboard.next();
		System.out.print("\n\n");
		viewOrder();
		System.out.print("Thank you for your order, " + name + ".\n");
	}

	public static void displayAmount() {
		System.out.print("You have " + keyChains + " keychains. ");
	}
}



    

Picture of the output

This Should Work