Toaz - Info Ite6104 Computer Programming 2 Prelim To Final Quiz PR
Toaz - Info Ite6104 Computer Programming 2 Prelim To Final Quiz PR
Programming 2
QUIZ
Prelim Quiz 1
Started on Friday, 30 September 2022, 11:57 AM
State Finished
Completed on Friday, 30 September 2022, 12:10 PM
Time taken 12 mins 47 secs
Marks 10.00/10.00
Grade 100.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Why do we need to set the path for JavaC in
command line? Select one:
a.
To resolve syntax error
b.
To make JavaC available or accessible in command line.
c.
To resolve runtime error
d.
It is part of the compilation process
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the correct statement to set JavaC path in
command line? Select one:
a.
All of the given choices are correct
b.
C:\Program Files\Java\jdk1.6.0_23\bin
c.
set path
d.
< JavaC directory >
e.
path C:\Program Files\Java\jdk1.6.0_23\bin
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
The feature of Java which makes it possible to execute several tasks
simultaneously. Select one:
a.
Multithreade
d
b.
Code Security
c.
Robus
t
d.
Platform independent
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What was the initial name for the Java programming
language? Select one:
a.
Jav
a
b.
NetBea
ns
c.
Oa
k
d
.
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the correct statement to compile Java program in
command line? Select one:
a.
javac HelloWorld.java
b.
java HelloWorld
c.
javac HelloWorld
d.
java HelloWorld.java
Question 6
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following we are not allowed to write java source
code? Select one:
a.
Notepa
d
b.
Blue
J
c.
NetBea
ns
d.
None of these
e.
eclips
Question 7
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What will happen if we compile the statement below? ~System.out.println(“Hello
World!”) Select one:
a.
There will be a syntax error after compilation.
b.
There will be a logical error after compilation.
c.
There will be a runtime error after compilation.
d.
There will be no error after compilation.
Question 8
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the extension name of a Java Source
code? Select one:
a.
java
c
b
.
j
c.
jav
a
d.
clas
Question 9
Correct
Mark 1.00 out of 1.00
Flag question
Question text
The Java feature, "write once, run anywhere", is
termed as Select one:
a.
Object Oriented
b.
Robus
t
c.
Platform independent
d.
High Performance
Question 10
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the correct statement to run Java program in command
line? Select one:
a.
javac HelloWorld
b.
javac HelloWorld.java
c.
java HelloWorld
d.
java HelloWorld.java
1. UGRD-ITE6104-2213T
2. Prelim Quiz 2
QUIZ
Prelim Quiz 2
Started on Friday, 14 October 2022, 2:38 PM
State Finished
Completed on Friday, 14 October 2022, 2:46 PM
Time taken 8 mins 1 sec
Marks 10.00/10.00
Grade 100.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is floating-point literal?
Select one:
a.
It could be double or float value.
b.
Can be express in scientific notation.
c.
By default it is double type.
d.
An integer literal with decimal point.
e.
All of these
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following a valid Java
identifier? Select one:
a
.
i
d
b.
_id
c.
All of these
d.
$id
e.
id_
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is not a Java
comment? Select one:
a.
Multi-Line Comments
b.
Declaration Comments
c.
Documentation Comments
d.
None of these
e.
Single Line Comments
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is a valid
identifier? Select one:
a.
stati
c
b.
publi
c
c.
tru
e
d.
nam
e
e.
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is not a primitive data
type? Select one:
a.
byt
e
b.
lon
g
c.
String
d.
None of these
e.
shor
t
Question 6
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is not a valid variable declaration in
Java? Select one:
a.
short
x;
b.
float x = 2.0D;
c.
int x = 1;
d.
int
x;
e.
None of these
Question 7
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is not a valid Float value?
Select one:
a.
3.4028235E+3
8F
b.
1.2345E
+3
c.
None of these
d.
12345678910
F
e.
1.2
Question 8
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is not an escape
sequence? Select one:
a.
\f
b.
\b
c.
\t
d.
None of these
Question 9
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is not a java
keyword? Select one:
a.
None of these
b.
nam
e
c.
got
o
d.
els
e
e
.
Question 10
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is not Java
Literal? Select one:
a.
Character value
b.
None of the above
c.
Float value
d.
Integer value
e.
Boolean value
1. UGRD-ITE6104-2213T
2. Midterm Quiz 1
QUIZ
Midterm Quiz 1
Started on Friday, 28 October 2022, 11:43 AM
State Finished
Completed on Friday, 28 October 2022, 11:47 AM
Time taken 4 mins 25 secs
Marks 10.00/10.00
Grade 100.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What will happen if you use JOptionPane.showMessageDialog statement in your
program? Select one:
a.
None of these
b.
The program will display message dialog box.
c.
The program will display message dialog box returns String value.
d.
The program will display an input dialog box that allows the user to input text
and returns String value.
e.
The program will display an input dialog box that allows the user to input text
and returns the correct type value.
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is a valid statement to accept int input? Let us assume
that we have declared scan as Scanner.
Select one:
a.
int num = scan.nextLong();
b.
short num = scan.nextShort();
c.
short num = scan.nextInt();
d.
None of these
e.
int num = scan.getInt();
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What will be the output if you execute this code?
do{System.out.println("Hello
World!");}while(false);
Select one:
a.
The code will not run because of
syntax error
b.
print "Hello World"
infinitely
c.
None of
these
d.
print "Hello
World"
e.
Do
nothing
Feedback
Your answer is correct.
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
what will be the output if you execute this
code? int x=1;
switch(x
){ case
1:
System.out.print(“1”);
case 2:
System.out.print(“1”);
case
System.out.print(“1”);
3:
System.out.print(“1”);
defaul
t:
Select one:
a.
display nothing
b.
None of these
c.
display 1234
d.
display
1
e.
display 1111
Feedback
Your answer is correct.
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following method reads input from the user and return
String value? Select one:
a.
nextValue
()
b.
nextLine(
)
c.
All of these
d.
nextText(
)
e.
nextString
Question 6
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is a valid nextByte() return
value? Select one:
a.
int value
b.
None of these
c
.
3
d.
short value
e.
12
8
Question 7
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What will be the output if you execute this
code?
do{System.out.println("Hello
Select one:
a.
None of
these
b.
The code will not run because of
syntax error
c.
Do
nothing
d.
print "Hello World"
infinitely
e.
print "Hello
World"
Feedback
Your answer is correct.
Question 8
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which is not a repetition control
structure? Select one:
a.
None of these
b.
do while
c.
fo
r
d.
switc
h
e.
whil
e
Question 9
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is a valid nexDouble() return
value? Select one:
a.
3.141
6
b.
12.
0
c.
All of these
d.
double value
e.
floating-point literal
Question 10
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What will happen if you use JOptionPane. showInputDialog statement in your
program? Select one:
a.
The program will display message dialog box returns String value.
b.
The program will display message dialog box.
c.
The program will display an input dialog box that allows the user to input text
and returns the correct type value.
d.
The program will display an input dialog box that allows the user to input text
and returns String value.
e.
None of these
1. UGRD-ITE6104-2213T
2. Midterm Quiz 1
QUIZ
Midterm Quiz 1
Started on Friday, 28 October 2022, 11:38 AM
State Finished
Completed on Friday, 28 October 2022, 11:42 AM
Time taken 4 mins 32 secs
Marks 9.00/10.00
Grade 90.00 out of 100.00
Question 1
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
Which of the following has the correct form for an if
statement? Select one:
a.
if (boolean_expression)
b.
boolean_expressio
n
c.
if boolean_expression
d.
None of these
e.
if boolean_expression
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What will be the value of x after you execute this statement
int z=0; for(int x=0; x<10; x++) for(int y=0; y<x; y+
+) z*=(x*y); Select one:
a
.
1
b.
51
2
c.
23
6
d.
None of
these
e.
12
8
Feedback
Your answer is correct.
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is a valid nextInt() return
value? Select one:
a.
None of these
b.
long value
c.
floating-point literal
d.
3.141
6
e.
101
0
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is a valid statement to accept String
input? Select one:
a.
String str = JOptionPane.showInputDialog("");
b.
string str = scan.nextShort();
c.
None of these
d.
String num = scan.nextText();
e.
String str = scan.nextString();
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following does not return numeric
value? Select one:
a.
nextShort(
)
b.
nextLong(
)
c.
nextDouble
()
d.
None of these
e.
nextInt
Question 6
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which statement will check if x is less
than y?
Select
one:
a.
if (x<y);
b.
if
(x<>y)
c.
None of
these
d.
if
(x>y)
e.
if
(x>y)?:
Feedback
Your answer is correct.
Question 7
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which statement will check if x is
equal to y?
Select one:
a.
None of
these
b.
if (x!
<y)
c.
if
(x>y)
d.
if
(x<>y)
e.
if (y>y)
Feedback
Your answer is correct.
Question 8
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What will be the value of x after executing
this code
for(int x=0; x<=10; x++) {} is run?
Select
one:
a.
1
b
.
1
c.
1
0
d.
None of
these
e
.
0
Feedback
Your answer is correct.
Question 9
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What type of value does the nextLine()
returns? Select one:
a.
Strin
g
b.
None of these
c.
Lin
e
d.
doubl
e
e.
lon
Question 10
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which is not a decision control
structure? Select one:
a.
if else-if else
b
.
if
c.
if else
d.
None of these
e.
switc
h
1. UGRD-ITE6104-2213T
2. Midterm Quiz 2
QUIZ
Midterm Quiz 2
Started on Thursday, 24 November 2022, 3:31 PM
State Finished
Completed on Thursday, 24 November 2022, 3:35 PM
Time taken 3 mins 5 secs
Marks 10.00/10.00
Grade 100.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the length of the array: int[] intArray = { 1, 2, 3, 5,
6, 7 }; Select one:
a
.
4
b.
None of the
choices
c
.
5
d
.
7
e
.
6
Feedback
Your answer is correct.
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following correctly accesses the sixth element stored in an
array of 10 elements?
Select one:
a.
stringArray[5
];
b.
intArray[10
];
c.
None of these
d.
intArray[7
];
e.
intArray[6
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is a valid multidimensional
array? Select one:
a.
int intArray[][][];
b.
int[][][] intArray;
c.
int[][][][] intArray;
d.
int[][] intArray;
e.
All of these
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the output of the code snippet
below: int[] intArray = { 1, 2, 3, 5,
6, 7 };
for(int x = intArray.length-1; x>=0; x--)
{System.out.print(intArray[x]);} Select one:
a.
The given code is not valid
b.
1235
6
c.
None of
these
d.
76532
1
e.
12356
7
Feedback
Your answer is correct.
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the index number of the last element of an array with 30
elements? Select one:
a.
2
9
b.
3
0
c.
3
1
d
.
0
e.
Question 6
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following declares an array of int named
intArray? Select one:
a.
int[][] intArray;
b.
All of these
c.
int intArray[][];
d.
int[] intArray;
e.
int intArray[];
Question 7
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the maximum index of the array: int[] intArray = { 1,
2, 3, 5, 6, 7 }; Select one:
a
.
4
b.
None of the
choices
c
.
6
d
.
5
e
.
7
Feedback
Your answer is correct.
Question 8
Correct
Mark 1.00 out of 1.00
Flag question
Question text
From the array int[] intArray = { 1, 2, 3, 5, 6, 7 };, what is the value of
intArray[3]? Select one:
a
.
7
b
.
5
c
.
4
d
.
6
e.
None of the choices
Feedback
Your answer is correct.
Question 9
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following correctly accesses the sixth element stored in an
array of 10 elements?
Select one:
a.
stringArray[5
];
b.
None of these
c.
intArray[10
];
d.
intArray[6
];
e.
intArray[7
Question 10
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the output of the code snippet
below: int[] intArray = new int[10];
for(int x = 0; x<intArray.length; x++)
{System.out.print(intArray[x]);} Select one:
a.
The given code is not valid
b.
00000000
00
c.
0123567
89
d.
12356789
10
e.
None of the
choices
Feedback
Your answer is correct.
1. UGRD-ITE6104-2213T
2. Final Quiz 1
QUIZ
Final Quiz 1
Started on Friday, 2 December 2022, 11:37 AM
State Finished
Completed on Friday, 2 December 2022, 11:38 AM
Time taken 1 min 50 secs
Marks 10.00/10.00
Grade 100.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following will do implicit
cast? Select one:
a.
short x=1; int y
= x;
b.
String x = “0”; int y
= x;
c.
Object obj = new
Object();
d.
All of
these
Feedback
Your answer is correct.
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What will be the value of x if we execute this: String s = "25"; int x =
Integer.parseInt(s); ? Select one:
a.
String 25
b.
None of
these
c.
The code is not
valid.
d
.
0
e.
int
25
Feedback
Your answer is correct.
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the result if we execute this: “a” instanceof
String; ? Select one:
a.
fals
e
b.
“a
”
c.
None of these
d.
tru
e
e.
The code is not valid
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What do you call a blueprint of an
object? Select one:
a.
Clas
s
b.
None of these
c.
Constructo
r
d.
Objec
t
e.
Metho
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the result if we execute this:
“a”.equals(“a”);? Select one:
a.
“a
”
b.
fals
e
c.
The code is not valid
d.
tru
e
e.
None of these
Question 6
Correct
Mark 1.00 out of 1.00
Flag question
Question text
It is the method of hiding certain elements of the implementation of a
certain class? Select one:
a.
None of these
b.
Objec
t
c.
Object Oriented
d.
Clas
s
e.
Encapsulatio
n
Question 7
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following show casting
object? Select one:
a.
(className) object;
b.
SuperClass sc = new SuperClass(); SubClass sbc = new SubClass(); sbc =
(SubClass) sc;
c.
Employee emp = new Employee(); VicePresident veep = new
VicePresident(); veep = (VicePresident)emp;
d.
All of the choices
Feedback
Your answer is correct.
Question 8
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What do you call a variable that belong to the whole
class? Select one:
a.
Object Variable
b.
Class Method
c.
None of these
d.
Static Variable
e.
Class Variable
Question 9
Correct
Mark 1.00 out of 1.00
Flag question
Question text
It is a template for creating an
object? Select one:
a.
Encapsulation
b.
Clas
s
c.
Object Oriented
d.
Metho
d
e.
None of these
Question 10
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following creates an instance of
a class? Select one:
a.
String str = new String();
b.
Test t = new
Test();
c.
All of the
choices
d.
Object obj = new
Object();
e.
String str = new
String();
Feedback
Your answer is correct.
1. UGRD-ITE6104-2213T
2. Final Quiz 2
QUIZ
Final Quiz 2
Started on Friday, 2 December 2022, 11:37 AM
State Finished
Completed on Friday, 2 December 2022, 11:42 AM
Time taken 4 mins 48 secs
Marks 10.00/10.00
Grade 100.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What keyword is used to perform class
inheritance? Select one:
a.
inherit
s
b.
derive
s
c.
implemen
ts
d.
None of these
e.
extend
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is true about
Interface? Select one:
a.
It defines the signatures of a set of methods without the body
b.
It defines a standard and public way of specifying the behavior of classes
c.
All of these
d.
It is a special kind of block containing method signatures only
e.
It is use to model multiple inheritance which allows a class to have more
than one superclass.
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is the correct way to call the constructor of the
parent class? Select one:
a.
this.call(
)
b.
super
()
c.
super.call(
)
d.
this(
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following method is allowed to be
overriden? Select one:
a.
public no_override void setName(){}
b.
None of
these
c.
public final void
setName(){}
d.
public void
setName(){}
e.
public static void
setName(){}
Feedback
Your answer is correct.
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following class declaration is not allowed to be
instantiated? Select one:
a.
None of these
b.
class
Person{}
c.
public abstract class
Person {}
d.
public class
Person {}
e.
public final class
Person {}
Feedback
Your answer is correct.
Question 6
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is the correct way to define an
interface? Select one:
a.
interface: [InterfaceName]
b.
public
[InterfaceName] {}
c.
public interface [InterfaceName] {}
d.
public class interface [InterfaceName] {}
Feedback
Your answer is correct.
Question 7
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following class declaration is not allowed to be
inherited? Select one:
a.
public class Person {}
b.
public final class Person {}
c.
public abstract class Person {}
d.
None of these
e.
class Person{}
Feedback
Your answer is correct.
Question 8
Correct
Mark 1.00 out of 1.00
Flag question
Question text
It is the ability of an object to have many
forms? Select one:
a.
Abstractio
n
b.
Inheritanc
e
c.
Polymorphis
m
d.
Interfac
e
e.
Question 9
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of the following is the correct way to use an
interface? Select one:
a.
public class Person use [InterfaceName] {}
b.
public class Person apply
[InterfaceName] {}
c.
public class Person extends
[InterfaceName] {}
d.
None of
these
e.
public class Person implements
[InterfaceName] {}
Feedback
Your answer is correct.
Question 10
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What do you call a class that inherits a
class? Select one:
a.
Subcla
ss
b.
None of these
c.
Clas
s
d.
Parent class
e.
Supercla
ss
1. UGRD-ITE6104-2213T
2. Prelim Lab Quiz 1
QUIZ
Prelim Lab Quiz 1
Started on Friday, 30 September 2022, 12:14 PM
State Finished
Completed on Friday, 30 September 2022, 12:17 PM
Time taken 2 mins 30 secs
Marks 5.00/5.00
Grade 100.00 out of 100.00
Feedback This will test your program skills. Good Luck.
Question 1
Correct
Mark 1.00 out of 1.00
Flag question
Question
text
a.
James
Gosling
b.
Bjarne
Stroustrup
Feedback
Your answer is correct.
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which one of this is not Java software
platform?
a.
Eclips
e
b.
Spyder Anaconda
c.
Netbean
s
Feedback
Your answer is correct.
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
In this problem, which one of this is missing?
public Hello {
public static void main (String args []){
System.out.println("Hello!");
}
}
a.
clas
s
b
.
()
c
.
[
Feedback
Your answer is correct.
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
In this program, which of the following syntax need output this
word, "I'm a programmer" ?
a.
cout<
<
b.
print(
)
c.
System.out.printl
n();
Feedback
Your answer is correct.
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
In this program, what will be the output for this:
a.
500
0
b
.
5
c.
0.0
5
d.
0.
5
Feedback
Your answer is correct.
Note: Test this in your software in order to determine the correct answer.
1. UGRD-ITE6104-2213T
2. Prelim Lab Quiz 2
QUIZ
Question text
What is an example of
Comment?
a.
/-
b.
/**
*
*
*/
c.
\\
Feedback
Your answer is correct.
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Create a program to compute from this initial input and
here's the ff:
a = 10
b = 20
c =50
d=?
Note
:
1. Use the int for this
code.
2. d = a + b + c
3. package name
"Addition"
4. pubilc class name
6. Answer must be 80 if you add the three.
a.
package literal;
b.
package Addition;
c.
package literal;
Feedback
Your answer is correct.
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the correct code for displaying "Hello World!" if you use class name "Hello"?
a.
public class Hello_world_ex {
public static void main(String[] args)
{ System.out.println("Hi! \n");
}
}
b.
public class ex {
public static void main(String[] args)
{ System.out.println("Hi! \n");
}
}
c.
public class Hello{
public static void main(String[] args)
{ System.out.println("Hello
World!");
}
}
Feedback
Your answer is correct.
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is an example of correct
Identifier?
a.
P1
anda
b.
fo
r
c.
1
sgt
Feedback
Your answer is correct.
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
If you test this program, what will the output of this:
package Binary;
public class BinaryTest{
public static void main(String[] args) {
System.out.println(0b111111);
}
}
Note: Test this.
a.
4
0
b.
63
c.
10
Feedback
Your answer is correct.
1. UGRD-ITE6104-2213T
2. Midterm Lab Quiz 1
QUIZ
Flag question
Question text
Is Do - While Loop is a Repetition Control
Structure?
Select
Trueone:
Fals
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
While Loop is not a Repetition Control Structure.
Select
one:
True
False
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Match the ff:
If -
else Answer 1
stateme if (boolean_expression) statement; else statement;
nt
Nested
If - else Answer 2
stateme if (boolean_expression) statement1; statement2; else if (boolean_expression) statement; else statement
nt
If -
stateme Answer 3
nt if (boolean_expression) statement;
Feedback
Your answer is correct.
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is this looping syntax:
for(x=0;x>=5;x++)
a.
Whil
e
b.
Do - While
c.
For - Loop
Feedback
Your answer is correct.
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Is Nested If - Else Statement a Looping Statement?
Select one:
True
Fals
e
1. UGRD-ITE6104-2213T
2. Midterm Lab Quiz 2
QUIZ
Flag question
Question text
Match the following:
if (condition) {
// block of code to be executed if the condition is
true Answer 1
} If
switch(expression)
{ case x:
// code block
break
; case
y: Answer 2
// code block Sw itch
break
;
default
:
// code block
}
if (condition) {
// block of code to be executed if the condition is
true
} else { Answer 3
// block of code to be executed if the condition is
false
If-else
}
if (condition1) {
// block of code to be executed if condition1 is true
} else if (condition2) {
// block of code to be executed if the condition1 is
false and condition2 is true
} else { Answer 4
// block of code to be executed if the condition1 is Nested If-else
false and condition2 is false
}
Feedback
Your answer is correct.
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Fill the missing syntax:
int number = 10;
switch (day) {
case 2:
System.out.println("Two");
case 4:
System.out.println("Four");
case 6:
System.out.println("Six");
case 8:
System.out.println("Eight");
case 10:
System.out.println("Ten");
default:
System.out.println("Looking forward to the
Weekend");
}
a.
brea
k;
b.
brea
k
c.
els
e
Feedback
Your answer is correct.
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Do you think this is true?
While Syntax
for (statement 1; statement 2; statement
3) {
// code block to be executed
}
Do - while
Syntax do {
// code block to be executed
}
while (condition);
For-Loop Syntax
while (condition)
{
// code block to be executed
Select
one:
True
Fals
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the correct out for this program:
a.
1
2
3
4
5
6
7
8
9
10
b
.
0
1
2
3
4
5
6
7
8
9
1
0
c.
123456789
10
Feedback
Your answer is correct.
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the output for this:
a.
10
9
8
7
6
5
b.
109876
5
c
.
5
6
7
8
9
10
Feedback
Your answer is correct.
1. UGRD-ITE6104-2213T
2. Final Lab Quiz 1
QUIZ
Flag question
Question text
Match the following:
Object-Oriented Programming
1 Answer 2 OOP
Feedback
Your answer is correct.
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
OOP stands for Object-Oriented Program?
Select
one:
True
False
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the definition of Abstract
Method?
a.
Software component in
OOP.
b.
Method of hiding certain elements of the implementation of a
certain class.
c.
Methods in the abstract classes that do not have implementation.
Feedback
Your answer is correct.
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Match the following:
3
Feedback
Your answer is correct.
Question 5
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
What do you called the special kind of block containing method signatures (and
possibly constants) only?
Answer interface
:
1. UGRD-ITE6104-2213T
2. Final Lab Quiz 2
QUIZ
Flag question
Question text
The another name for Typecasting is Casting.
Select one:
True
Fals
e
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question
text
/**
* @param args the command line arguments
*/
public static void main(String[] args)
{ Puppy myPuppy = new
Puppy("Tom");
}
}
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What do you called a problem that arises during the execution of
a program?
a.
Exceptio
n
b.
Handlin
g
c.
OO
P
Feedback
Your answer is correct.
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Match the following:
Answer 1
Inheritance Class Hierarchy
Answer 2
Polymorphism Class Hierarchy
Answer 3
Abstract Class Hierarchy
Feedback
Your answer is correct.
Question 5
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
What do you called adding the final keyword in the method declaration?
Answer: variable