Assignment #101 and Key Chain
Code
/// Name: Graham Pollock
/// Period: 5
/// Program Name: Key Chain
/// File Name: KeyChain.java
/// Date Finished: 03/28/2016/
import java.util.Scanner;
public class KeyChains
{
public static void main(String[] args)
{
Scanner kb = new Scanner(System.in);
System.out.println("The Kaychain shop");
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("Your Choice: ");
int choice = kb.nextInt();
System.out.println("");
while (choice != 4)
{
if ( choice == 1)
addKeychains();
else if (choice == 2)
removeKeychains();
else if (choice == 3)
viewOrder();
else
System.out.println("ERROR: Please choose one of the options");
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("Your Choice: ");
choice = kb.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 checkout()
{
system.out.println("GOODBYE");
}
}
Picture of the output