Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Write a literal representing the false value. 2. Write a literal representing

ID: 3613896 • Letter: 1

Question

1. Write a literal representing the false value.
2.  Write a literal representing the truevalue.
3. Declare a variable isACustomer suitable forrepresenting a true or false value.
4. Write an expression that evaluates to true if and onlyif the value of the integer variable x is equal tozero.
5. Write an expression that evaluates to true if and onlyif the variables profits and losses are exactlyequal.
6.  Given the char variable c , write anexpression that is true if and only if the value of c is notthe space character.
7. Working overtime is defined as having worked more than40 hours during the week. Given the variable hoursWorked ,write an expression that evaluates to true if the employee workedovertime.
8. Write an expression that evaluates to true if thevalue x is greater than or equal to y .
9. Given the variables numberOfMen and numberOfWomen , write an expression that evaluates to true ifthe number of men is greater than or equal to the number ofwomen.
10. Given a double variable called average ,write an expression that is true if and only if the variable'svalue is less than 60.0 .
11. Given an int variable grossPay , write anexpression that evaluates to true if and only if the value of grossPay is less than 10,000 .
12. Given that the variables x and y havealready been declared and assigned values, write an expression thatevaluates to true if x is non-negative and y isnegative.
13. Given that the variables x and y havealready been declared and assigned values, write an expression thatevaluates to true if x is positive (including zero) or y isnegative. 1. Write a literal representing the false value.
2.  Write a literal representing the truevalue.
3. Declare a variable isACustomer suitable forrepresenting a true or false value.
4. Write an expression that evaluates to true if and onlyif the value of the integer variable x is equal tozero.
5. Write an expression that evaluates to true if and onlyif the variables profits and losses are exactlyequal.
6.  Given the char variable c , write anexpression that is true if and only if the value of c is notthe space character.
7. Working overtime is defined as having worked more than40 hours during the week. Given the variable hoursWorked ,write an expression that evaluates to true if the employee workedovertime.
8. Write an expression that evaluates to true if thevalue x is greater than or equal to y .
9. Given the variables numberOfMen and numberOfWomen , write an expression that evaluates to true ifthe number of men is greater than or equal to the number ofwomen.
10. Given a double variable called average ,write an expression that is true if and only if the variable'svalue is less than 60.0 .
11. Given an int variable grossPay , write anexpression that evaluates to true if and only if the value of grossPay is less than 10,000 .
12. Given that the variables x and y havealready been declared and assigned values, write an expression thatevaluates to true if x is non-negative and y isnegative.
13. Given that the variables x and y havealready been declared and assigned values, write an expression thatevaluates to true if x is positive (including zero) or y isnegative.

Explanation / Answer

Dear... 1) boolean Literal=false; 2)boolean Literal=true; 3)boolean isACustomer; 4)if(x==0)where x==0 is anexpression 5) if(profits==Losses) 6)char c;    if(c!=' ') 7) int hoursWorked;    boolean overtime;    if(hoursWorked>40)       overtime=true; 8)if(x>=y) 9) if(numberOfMen>=numberOfWomen) 10)doubleaverage;   if(average<=60.0) Hope this will helpyou... 3)boolean isACustomer; 4)if(x==0)where x==0 is anexpression 5) if(profits==Losses) 6)char c;    if(c!=' ') 7) int hoursWorked;    boolean overtime;    if(hoursWorked>40)       overtime=true; 8)if(x>=y) 9) if(numberOfMen>=numberOfWomen) 10)doubleaverage;   if(average<=60.0) Hope this will helpyou...