Assignemnt #31 and ComplexBoolean.java

Code

    /// Name: Boris Kazantsev
    /// Period: 6
    /// Program Name: ComplexBoolean
    /// File Name: ComplexBoolean.java
    /// Date Finished: 10/23/2015
    
    import java.util.Scanner;
    
    public class ComplexBoolean{
        public static void main(String[] args){
            Scanner keyboard = new Scanner(System.in);
            
            int age;
            double income, attractiveness;
            boolean allowed;
            
            System.out.print("Enter your age: ");
            age = keyboard.nextInt();
            
            System.out.print("Enter your income: ");
            income = keyboard.nextDouble();
            
            System.out.print("How attractive are you, on a scale from 0.0 to 10.0? ");
            attractiveness = keyboard.nextDouble();
            
            allowed = ( age > 25 && age < 40 && ( income > 50000 || attractiveness >= 8.5 ) );
            
            System.out.println("You are allowed to date my daughter: " + allowed);
        }
    }
                   
    

Picture of the output

Assignment 31