Lets create a new program where we determine if a person needs to file taxes or not

Question:

Let’s create a new program where we determine if a person needs to file taxes or not based on age and the income they make. Create a new class file called TaxIndicator and create a main() container. Here are the requirements: 

● If the person is either 18 years old or younger, or if the person is 60 years old or older, then they do not need to file taxes. 

● If the person is within the age range of 19 to 59 years and if they make $51,000 or more in annual income, then they must file their taxes. 

● If the person is within the age range of 19 to 59 years but their income is less than $50,000 then they do not need to file their taxes.

Have a variable for age and another for income. Print whether the person owes taxes or not based on the conditions. Set some values so that we can trigger one of these conditions. Use the logical operators and if/else-if/else statements to code for this program.  

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: