In order for a student to pass CSC-117 class, the student must earn 70 or higher on
Question:
In order for a student to pass CSC-117 class, the student must earn 70 or higher on the
Midterm and the Final and must do all homework assignments, otherwise the student
will fail the class.
Translate the above statement into if else java statement.
2. Writ a compound logic statement for the following scenario.
Company ABC is advertising for a job, a candidate must meet the following requirements:
a) BS degree in Computer science
b) Gpa 3.0 or higher
c) Minimum of 2 years' experience.
3. Writ a complete example of:
a) An if-else statement.
b) A simple if statement.
c) A nested if statement.
d) An if-else-if statement.
4. Assume that the following variables are declared as follow:
int Var1 = 19, Var2 = 2, Var3 = 0;
What will the output of the following statements be?
Var3 = Var1 / Var2;
Var2 = Var2 / Var1;
a) System.out.print(Var3);
b) System.out.print(Var2);
int Var1 = 11, Var2 = 15,
c) System.out.print(Var1 % Var2);
d) System.out.print(Var1 % 3);
e. Var1 += 7;
System.out.print(Var1);
5. For the following declared variables, identify the valid and invalid declarations.
If invalid correct and state why invalid.
a) Int Number = 4;
b) double value = 3.99.
c) char letter = "A";
d) String MyString ="Princess";
e) double Double = 3.14;
Finite Mathematics and Its Applications
ISBN: 978-0134768632
12th edition
Authors: Larry J. Goldstein, David I. Schneider, Martha J. Siegel, Steven Hair