promotion image of download ymail app

Help with writing this Java Program?

I need to write a Java program that will tell an airline passenger if they are eligible or not for a 20% discount.

A passenger is eligible if they are 7 years old OR less then 7 years old OR they are 65 years old OR they are older then 65 years old.

This program needs to also request the passenger's age as well as their name.

This program needs to print out whether or not they are eligible for the discount.

1 Answer

  • EddieJ
    Lv 7
    1 month ago
    Favorite Answer

    You need to use a Scanner object to get input from the user.

    You would use an <if> statement to determine if the passenger is eligible for a discount.

    • Commenter avatarLogin to reply the answers
Still have questions? Get your answers by asking now.