Sunteți pe pagina 1din 7

n 5.0 out of 10.

0 ( 50 %)

Feedback comment Insufficient, do additional activities to get extra points

Question 1
Incorrect
Score 0.0 out of 1.0

Flag the question

Question text
What is the meaning of instantiating a class in JAVA?
Select one:
Delete a class
Create an object from a class
Duplicate a class

Connect two classes together

Question 2
Incorrect
Score 0.0 out of 1.0

Flag the question

Question text
In the following code snippet, select the name of the defined class

Select one:
Number
Double
String
Println

Question 3
Correct
Rate 1.0 out of 1.0

Flag the question

Question text
In the program presented below, suppose that the user captures a value of 5
in the “number” variable, the program prints the output:

Select one:
10, 25 and 125
10, 15 and 125
25, 10 and 125

5, 10 and 15

Question 4
Correct
Rate 1.0 out of 1.0

Flag the question

Question text
Based on the following code, what is the output that the program sends to
the console?
public class Repetitive {
public static void main(String[] args) {
for(int i = 51; i<=150;i++)
System.out.println(i);
}
}
Select one:
Print consecutive even numbers less than 150
Print the sum of the numbers that divide 150 starting with 51.

Print the consecutive numbers from 51 to 150


Prints the sum of the first 100 natural numbers between 51 and 150

Question 5
Incorrect
Score 0.0 out of 1.0

Flag the question

Question text
Based on the following Java code, what would be the output of the following
program?
int age = 18;
int category = 2;

if(age >=18 || category == 2 )


{
System.out.println(“Correct Category”);
}

else {
System.out.println(“Incorrect category”);
}
Select one:

System.out.println(“Correct Category”);
Correct category
System.out.println(“Incorrect category”);
Incorrect category

Question 6
Correct
Rate 1.0 out of 1.0

Flag the question

Question text
What does the following code snippet tell us? The constructor receives four
parameters which are:

class Rectangle{
int x;
int and;
int width;
int high;
Rectangle(int x1, int y1, int w, int h){
x=x1;
y=y1;
width=w;
height=h;
}
}
Select one:
x, y
w,h
x, y, width and height

x1, y1, w, h

Question 7
Correct
Rate 1.0 out of 1.0
Flag the question

Question text
What is the functionality of the while control structure?

Select one:
It is a structure that allows a block of statements to be iterated as long as
the condition is true.

It is a structure that allows a certain block of sentences to be carried out


based on a series of cases.
It is a structure that allows catching an unhandled exception.

Provides a secondary execution path when an if clause evaluates to false.

Question 8
Incorrect
Score 0.0 out of 1.0

Flag the question

Question text
In the following UML diagram select the answer that is true.

Select one:
Brand, model and price are attributes
Mark, reply and price are methods
Brand, model and brand are attributes

Dialing, answering and writing are attributes


Question 9
Correct
Rate 1.0 out of 1.0

Flag the question

Question text
What is the definition of package?
Select one:
It is a model or template through which we create objects
An IDE to develop applications
A library to build graphical interfaces
It is a folder or set of folders where we can create modular and reusable
code.

Question 10
Incorrect
Score 0.0 out of 1.0

Flag the question

Question text
Based on the following program, what is the output?

public class RepetitiveStructureWhile1 {


public static void main(String[] ar) {
int x;
x=1;
while (x<=100) {
System.out.print(x);
System.out.print(" - ");
x = x + 1;
}
}
}
Select one:
Print the numbers 1 and 100 on the screen

Prints the numbers added with 1 on the screen


Prints the numbers from 1 to 100 on the screen in descending order
Print the numbers from 1 to 100 on the screen

S-ar putea să vă placă și