
Term-long Review
Authored by Farah Habib
Computers
University
Used 8+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
32 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT an advantage of proper encapsulation?
Encapsulation helps to enforce constraints
Encapsulated code uses less memory when executed
Encapsulation provides a more abstract view of classes
All of the above are advantages encapsulation provides
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
_____ helps deal with complexity by hiding unnecessary details.
Abstraction
Access modifiers
Encapsulation
Privacy screens
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
private, public, and protected are examples of __________
Attribute modifiers
Method modifiers
Access modifiers
Static modifiers
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these variable assignments is valid?
int x = 5.7;
double x = "5";
char x = "A";
String x = "5";
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If A is a subclass of B, then which of the following is true:
Objects of type B can be stored in variables of type A
Objects of type A can be stored in variables of type B
Both of the above are true
None of the above is true
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To treat an object of type A as an object of type B, this must be true:
A implements the interface B
B is a descendant class of A
Both of the above can be true
None of the above are true
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
'Upcasting' a variable is a safe operation that does not require an explicit typecast statement.
True
False
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?