Assignemnt #38 and SpaceBoxing.java

Code

    /// Name: Boris Kazantsev
    /// Period: 6
    /// Program Name: SpaceBoxing
    /// File Name: SpaceBoxing.java
    /// Date Finished: 11/21/2015
    
    import java.util.Scanner;
    
    public class SpaceBoxing{
        public static void main(String[] args){
            Scanner keyboard = new Scanner(System.in);
            int weight, visit;
            
            System.out.print("Please enter your current earth weight: ");
            weight = keyboard.nextInt();
            
            System.out.println("I have information for the following planets:");
            System.out.println("    1. Venus     2. Mars    3. Jupiter");
            System.out.println("    2. Saturn    5. Uranus  6. Neptune");
            
            System.out.print("Which planet are you visiting? ");
            visit = keyboard.nextInt();
            
            if (visit == 1){
                System.out.println("Your weight would be " + (weight * 0.78) + " pounds on Venus.");
            }
            
            else if ( visit == 2 ){
                System.out.println("Your weight would be " + (weight * 0.39) + " pounds on Mars.");
            }
            
            else if ( visit == 3 ){
                System.out.println("Your weight would be " + (weight * 2.65) + " pounds on Jupiter.");
            }
            
            else if ( visit == 4 ){
                System.out.println("Your weight would be " + (weight * 1.17) + " pounds on Saturn.");
            }
            
            else if ( visit == 5 ){
                System.out.println("Your weight would be " + (weight * 1.05) + " pounds on Uranus.");
            }
            
            else if ( visit == 2 ){
                System.out.println("Your weight would be " + (weight * 1.23) + " pounds on Neptune.");
            }
            else {
                System.out.println("Please select appropriate number.");
                
            }
        }
    }
                   
    

Picture of the output

Assignment 38