CS 122 - Final Examination

Quiz
•
Computers
•
University
•
Hard
Christine Pitos
Used 7+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A way to discover which of the two classes is the base class and which is the subclass is to _______.
look at the class size
try saying the two class names together
use polymorphism
Both a and b are correct
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Employing inheritance reduces errors because ______.
the new classes have access to fewer data fields
the new classes have access to fewer methods
you can copy methods that you already created
many of the methods you need have already been used and tested
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A base class can also be called a ______.
child class
subclass
derived class
superclass
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following choices is the best example of a parent class/child class relationship?
Rose/Flower
Present/Gift
Dog/Poodle
Sparrow/Bird
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The Java keyword that creates inheritance is _____.
static
enlarge
extends
inherits
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A class named Building has a public, nonstatic method named getFloors(). If School is a child class of Building, and modelHigh is an object of type School, which of the following statements is valid?
Building.getFloors();
School.getFloors();
modelHigh.getFloors();
All of the previous statements are valid.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is true?
A child class inherits from a parent class.
A parent class inherits from a child class.
Both of the preceding statements are true.
Neither a nor b is true.
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
C++ Quiz-1

Quiz
•
University
20 questions
EXCEL

Quiz
•
KG - Professional Dev...
15 questions
Java Method

Quiz
•
University
20 questions
Multithreading in java

Quiz
•
University
11 questions
MIDTERM PRE-EXAM QUIZ

Quiz
•
University
20 questions
Quiz java Swing

Quiz
•
University
11 questions
Java GUI Unit 7 Review

Quiz
•
University
15 questions
Java GUI Unit 1 Review

Quiz
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade