Assignment 101; Keychain
Code
// Donovan Rich
// Period 6
// Keychains for Sale
// Keychain.java
// 3/30/2016
import java.util.Scanner;
public class Keychain
{
public static void main (String [] args)
{
System.out.println("Get yer keychains here, bruv.");
Scanner keyboard = new Scanner(System.in);
int choice;
do
{
System.out.println("1) Add keychains to order\n");
System.out.println("2) Remove keychains from order\n");
System.out.println("3) View current order\n");
System.out.println("4) Checkout\n");
System.out.print("Please enter a choice");
choice = keyboard.nextInt();
if (choice == 1)
{
addKeychains();
}
else if (choice == 2)
{
removeKeychains();
}
else if (choice == 3)
{
viewOrder();
}
else if (choice == 4)
{
checkout();
}
}while (choice != 4);
}
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("CHECKOUT");
}
}
Picture of the output