Code
/// Name: Afaf Nabeeha
/// Period: 7
/// Program Name: Keychains for Sale
/// File Name: Keychains.java
/// Date Finished: 3/8/2016 public class Keychains
import java.util.Scanner;
public class Keychains
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int a;
a = 0;
while (a != 4)
{
System.out.println( "Ye Olde Kyechain Shoppe" );
System.out.println();
System.out.println( "1. Add Keychains to Order" );
System.out.println( "2. Remove Kyechains from Order" );
System.out.println( "3. View Current Order" );
System.out.println( "4. Checkout" );
System.out.println();
System.out.print( "Please enter your choice: " );
a = keyboard.nextInt();
if ( a == 1 )
{
Order();
}
else if ( a == 2 )
{
Remove();
}
else if ( a == 3 )
{
View();
}
else if ( a == 4 )
{
Checkout();
}
else
{
a = 4;
Checkout();
}
}
}
public static void Order()
{
System.out.println( "ADD KEYCHAINS" );
}
public static void Remove()
{
System.out.println( "REMOVE KECHAINS" );
}
public static void View()
{
System.out.println( "VIEW ORDER" );
}
public static void Checkout()
{
System.out.println( "CHECKOUT" );
}
}
Picture of the output