Question
1. Write an if statement that prints out student or non-student based on a boolean variable isStudent Hint: you can use System.out.println () method for
1. Write an if statement that prints out student or non-student based on a boolean variable isStudent Hint: you can use System.out.println () method for outputting the result.
2. Write an if statement that tests a variable that prints out give a raise if the variable workerEvaluation (which can hold 1-5) is greater than 3 AND if the variable yearsWithCompany is greater than 2. Use logical operator && in the boolean expression.
3. Write a multiple if statement that tests a variable that prints out give a raise if the variable workerEvaluation (which can hold 1-5) is greater than 3 OR if the variable yearsWithCompany is greater than 2. Use logical operator || in the boolean expression.
4. Write a multiple-branch if -- else if statement that tests the same variable average and assigns (A,B,C,D or F) to char type variable grade, based on average. (>=90, >=80, >=70, >=60, or < 60)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started