Assignment = Keychains For Sale, real ultimate power

Code

  /// Name: Sam Wilson
  /// Period: 6
  /// Program Name: Keychains For Sale, real ultimate power
  /// File Name: keychains3.java lol
  /// Date Finished: 3/29/16
 
  
  import java.util.Scanner;
    
    public class keychains3
    {
        public static void main( String[] args )
        {
            Scanner keyboard = new Scanner(System.in);
            
            System.out.println();
            System.out.println( "KEYCHAIN SHOP" );
            System.out.println();
            int choice, number, price, baseShipping, perKeyShip;
            double tax;
            
            perKeyShip = 1;
            baseShipping = 5;
            tax = 1.0825;
            number = 0;
            price = 10;
            
            do
            {
                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 )
                    number = addKeychains(number);
                
                else if ( choice == 2 )
                    number = removeKeychains(number);
                    
                else if ( choice == 3 )
                    viewOrder(number, price, tax, baseShipping, perKeyShip);
                    
                else if ( choice == 4 )
                    checkout(number, price, tax, baseShipping, perKeyShip );
                    
                else
                    System.out.println( "That is not a valid choice. Please try again." );
                
            }while ( choice != 4 );
            
        }
                                   
        public static int addKeychains(int number)
        {
            Scanner keyboard = new Scanner(System.in);
            
            int add, total;
            
            System.out.println( "You have " + number + " keychains at the moment." );
            System.out.print( "How many would you like to add? " );
            add = keyboard.nextInt();
            
            total = number + add;
            
            System.out.println( "You now have " + total + " keychains." );
            System.out.println();
            
            return total;
        }
        
        public static int removeKeychains(int number)
        {
            Scanner keyboard = new Scanner(System.in);
            
            int remove, total;
            
            System.out.println( "You have " + number + " keychains at the moment." );
            
            if ( number <= 0 )
            {
                System.out.println( "You do not have any keychains to remove." );
            }
            
            System.out.print( "How many would you like to remove? " );
            remove = keyboard.nextInt();
            
            total = number - remove;
            
            System.out.println( "You now have " + total + " keychains." );
            
            System.out.println();
            
            return total;
        }
        
        public static void viewOrder( int number, int price, double tax, int baseShipping, int perKeyShip )
        {
            int shipTotal = ( perKeyShip * number ) + baseShipping;
            int subTotal = ( number * price ) + shipTotal;
            double total = subTotal * tax;
            
            System.out.println( "You have " + number + " keychains." );
            System.out.println( "Keychains cost $10 each." );
            System.out.println( "Your shipping total is $" + shipTotal + "." );
            System.out.println( "Your subtotal is $" + subTotal + "." );
            System.out.println( "The total is $" + total + "." );
        
 
      

    

Picture of the output

Assignment 31