Essay
public class Student
{
private int studentNum;
private int studentScore;
public int MAX_NUM = 500;
public int MAX_SCORE = 100;
Student(int num, int score)
{
}
Decision making can be used to control the allowed values in an object's fields. In the above code, the Student class contains two fields that hold a student number and a score. A constructor accepts values for these fields as parameters. Write the code between the curly brackets that will determine whether the value of num is less than the MAX_NUM constant. If true, assign the value of num to studentNum . Otherwise, assign the value of MAX_NUM to the studentNum . Then check if the value of score is less than or equal to MAX_SCORE . If true, assign the value of score to studentScore . Otherwise, assign 0 to studentScore .
Correct Answer:

Verified
if(num <= MAX_NUM)
student...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
student...
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q38: Write a nested if statement that will
Q39: The _ statement is useful when you
Q40: if(qtySold > QUOTA) <br> bonusPay = 50; <br> totalPay
Q41: _ involves choosing between alternative courses of
Q42: Match each term with the correct statement
Q44: Create an if statement that checks if
Q45: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TBX9006/.jpg" alt=" Using the above
Q46: A(n) _ is particularly useful when two
Q47: When using equals and not equals for
Q48: An alternative to using a Boolean expression,