Assignemnt #101: Keychains for Sale
Code
/// Name: Cassie
/// Period: 6
/// Program Name: Keychains for Sale
/// File Name: KeychainsForSale.java
/// Date Finished: 3/11/2016
import java.util.Scanner;
public class KechainsForSale {
public static void main( String[] args ) {
Scanner keyboard = new Scanner(System.in);
int choice = 1;
System.out.println( "Rachel's Keychain Boutique" );
System.out.println();
while ( choice != 4 ) {
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 your choice: " );
choice = keyboard.nextInt();
System.out.println();
if ( choice == 1 ) {
addKeychains();
} else if ( choice == 2 ) {
removeKeychains();
} else if ( choice == 3 ) {
viewOrder();
} else if ( choice == 4 ) {
checkout();
} else {
System.out.println( "Please try again." );
}
System.out.println();
}
}
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