Assignemnt #104
Code
/// Name: Connor Siri
/// Period: 7
/// Program Name: Key
/// File Name: Key.java
/// Date Finished: 2/16/2016
import java.util.Scanner;
public class Key
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
System.out.println("Ye Olde Keychain Shoppe");
System.out.println("");
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");
System.out.println("");
System.out.print("Please enter yout choice: ");
int choice = keyboard.nextInt();
System.out.println("");
while ( choice != 4 )
{
if ( choice == 1 )
addKeychains();
else if ( choice == 2 )
removeKeychains();
else if (choice == 3 )
viewOrder();
else
error();
System.out.println("");
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");
System.out.println("");
System.out.print("Please enter yout choice: ");
choice = keyboard.nextInt();
System.out.println("");
}
checkout();
}
public static void addKeychains()
{
System.out.println("Add Keychains");
}
public static void removeKeychains()
{
System.out.println("Remove Keychains");
}
public static void viewOrder()
{
System.out.println("View Order");
}
public static void error()
{
System.out.println("Error");
}
public static void checkout()
{
System.out.println("Checkout");
}
}
Picture of the output