Write a Java if statement that correctly computes a solution for each of the following problem descriptions:
A student with a GPA of at least 1.5, but less than 2, is on probation; with less than 1.5, the student is failing. (Exercise R6.11, page 224)
Assume that the students GPA is stored in a variable named gpa, that a String variable named status has already been set to "Good", and that it should be changed to "Probation" or "Failing" according to the problem statement above.
A rebate cheque will be issued by the government to all its citizens who are 18 years of age or older. For most adult citizens, the rebate cheque will be for $400, but for senior citizens, defined as those 65 years old or older, the rebate will be $500.
Assume that the age of the person currently being considered is stored in variable age and that the variable rebate has been initialized to zero.
A tax rebate of $200 will be issued to all citizens who are 18 years of age or older and who had a taxable income in the previous tax year that was less than $18,000.
Assume that the age of the person currently being considered is stored in variable age, that the person's taxable income for last year is stored in income, and that the variable rebate has been declared as a double but has not yet been assigned a value.
A tax rebate of $200 will be issued to all citizens who are either 65 years of age or older or who had a taxable income in the previous tax year that was less than $18,000.
Assume that the age of the person currently being considered is stored in variable age, that the person's taxable income for last year is stored in income, and that the variable rebate has been declared as a double but has not yet been assigned a value.