Assuming that a user enters 45 as the brightness of a lamp, which of the following hand-trace tables is valid for the given code snippet?
Int brightness = 0;
String description = "";
Scanner in = new Scanner(System.in) ;
System.out.print("Enter your lamp brightness (in watts) : ") ;
Brightness = in.nextInt() ;
If (brightness >= 120)
{
Description = "very bright";
If (brightness >= 100)
{
Description = "bright";
}
}
Else
{
Description = "pleasant";
If (brightness <= 50)
{
Description = "dim";
}
}
A) 
B) 
C) 
D) 
Correct Answer:
Verified
Q80: What is the output of the following
Q83: Assuming that the valid cost should be
Q86: What is the output after running the
Q90: What is the output of the following
Q92: Consider the following code snippet. What is
Q93: Assuming that a user enters 68 as
Q95: Which of the following conditions tests whether
Q96: What is the output of the following
Q100: What is the output of the following
Q107: Which of the following options checks that
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents