
CSC703_T3_Milestone2_PC2.1_2.9_P_ID
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Easy
Amira Zedan
Used 4+ times
FREE Resource
Enhance your content in a minute
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
PC2.1: Facilitate polymorphism by assigning an object of type S to a reference of type T considering S is a subclass of T.
Question: Which statement demonstrates the concept of polymorphism in Java?
PC2.1: Facilitate polymorphism by assigning an object of type S to a reference of type T considering S is a subclass of T.
Question: Which statement demonstrates the concept of polymorphism in Java?
a) java T obj = new S();
b) java S obj = new T();
c) java T[] array = new S[10];
d) java ArrayList<S> list = new ArrayList<T>();
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
PC2.2: Demonstrate understanding of the fact that if S is a subclass of T, then a reference of type T can be used to refer to an object of type T or S through program design and analysis.
Question: Which scenario illustrates the use of a reference of type T to refer to an object of type T or its subclass S?
PC2.2: Demonstrate understanding of the fact that if S is a subclass of T, then a reference of type T can be used to refer to an object of type T or S through program design and analysis.
Question: Which scenario illustrates the use of a reference of type T to refer to an object of type T or its subclass S?
a) Passing an object of type S to a method that accepts an argument of type T
b) Initializing an object of type T with a subclass S
c) Using an object of type S where an object of type T is expected
d) Declaring a variable of type T and assigning it to an object of type S
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
PC2.3: Declare references of type T, when S is a subclass of T, in the following declarations Formal method parameters and arrays — T[] var ArrayList<T> var.
Question: Which declaration correctly demonstrates the use of a reference of type T when S is a subclass of
PC2.3: Declare references of type T, when S is a subclass of T, in the following declarations Formal method parameters and arrays — T[] var ArrayList<T> var.
Question: Which declaration correctly demonstrates the use of a reference of type T when S is a subclass of
a) java S[] array = new T[10];
b) java T var = new S();
c) java ArrayList<T> list = new ArrayList<S>();
d) java T[] array = new S[10];
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
PC2.4: Define Polymorphism as the ability of an object to take on many forms.
Question: How is polymorphism defined in Java?
PC2.4: Define Polymorphism as the ability of an object to take on many forms.
Question: How is polymorphism defined in Java?
a) The process of converting one data type to another
b) The ability of an object to take on many forms
c) The process of hiding the implementation details
d) The ability to access methods and fields of different classes
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
PC2.5: Utilize the Object class through inheritance and call methods in an inheritance relationship.
Question: In Java, which class serves as the superclass for all other classes and allows for inheritance relationships?
Answer: a) java.lang.Object
PC2.5: Utilize the Object class through inheritance and call methods in an inheritance relationship.
Question: In Java, which class serves as the superclass for all other classes and allows for inheritance relationships?
Answer: a) java.lang.Object
a) java.lang.Object
b) java.util.ArrayList
c) java.lang.String
d) java.util.Scanner
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
PC2.6: Determine the behavior of a program during compile time and run time where in compile time, methods in or inherited by the declared type determine the correctness of a non-static method call while in run-time, the method in the actual object type is executed for a non-static method call.
Question: During which phase of program execution in Java, methods in or inherited by the declared type determine the correctness of a non-static method call?
PC2.6: Determine the behavior of a program during compile time and run time where in compile time, methods in or inherited by the declared type determine the correctness of a non-static method call while in run-time, the method in the actual object type is executed for a non-static method call.
Question: During which phase of program execution in Java, methods in or inherited by the declared type determine the correctness of a non-static method call?
a) Compile time
b) Run time
c) Debug time
d) Execution time
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
PC2.7: Demonstrate understanding of the fact that the Object class is the superclass of all other classes in Java and is part of the java.lang package.
Question: Which package contains the Object class, which is the superclass of all other classes in Java?
PC2.7: Demonstrate understanding of the fact that the Object class is the superclass of all other classes in Java and is part of the java.lang package.
Question: Which package contains the Object class, which is the superclass of all other classes in Java?
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
12 questions
BÀI 2: TRÍ TUỆ NHÂN TAO TRONG KHOA HỌC VÀ CUỘC SÔNG
Quiz
•
12th Grade
8 questions
Basic computer
Quiz
•
9th - 12th Grade
10 questions
ICT as Platform for Change
Quiz
•
11th - 12th Grade
10 questions
emtech
Quiz
•
12th Grade
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
12 questions
Remidi TLJ
Quiz
•
12th Grade
12 questions
1.2.4. Types of Programming Language
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
