CompProg2 CP2 Assessment
Quiz by Maria Lolita Masangcap
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
- Q1
In the image, there are different companies that produce distinct classifications of cars. As shown, the black car represents a/an ________.
Objects Toyota, Honda, Mitsubishi
Class Toyota, Honda, Mitsubishi
Class Car
Object Car
60s - Q2
In the image, there are different companies that produce distinct classifications of cars. As shown, the different colors of cars represent the ________.
Object Car
Objects Toyota, Honda, Mitsubishi
Class Toyota, Honda, Mitsubishi
Class Car
60s - Q3
In the given image, what is the name of the class?
Flowers
growing()
numPetals
type
60s - Q4
In the given image, name, type, color, and numPetals are the ____________ of the declared class.
class variables
class name
methods
instance variables
60s - Q5
In the given image, growing() and produceSeed() are the ____________ of the declared class.
methods
class name
instance variables
class variables
60s - Q6
(1) __________ itself does nothing but the real functionality is achieved through their (2) ____________.
(1) Attribute, (2) Methods
(1) Class, (2) Objects
(1) Method, (2) Attribute
(1) Object, (2) Classes
60s - Q7
In the given image, what step of object creation is represented by the statement inside the rectangle?
Initialization
Instantiation
Creation
Declaration
60s - Q8
Every class in java is considered as an implementation of the concept of ____________________.
Users re-arrange answers into correct orderJumble60s - Q9
In the given program code in the image, identify the variables that are encapsulated in the class and cannot be accessed by other classes.
Remarks and age only
salary and age only
age and amt
Remarks, age and salary
60s - Q10
Say that there are three classes: Computer, MacComputer, and IBMComputer. What are the likely relationships between these classes?
IBMComputer is the parent class, MacComputer and Computer are child classes of the IBMComputer.
none of the given options
Computer is a parent class. MacComputer is a child class of Computer, then IBMComputer is a child class of MacComputer.
Computer is the parent class, MacComputer and IBMComputer are child classes of the Computer.
60s - Q11
Which of the following is a correct syntax of defining a new class myIpad that inherits the parent class AppleDevice?
60s - Q12
What type of inheritance is shown in the program code?
Hierarchical Inheritance
Multilevel Inheritance
Single Inheritance
Multiple Inheritance
60s - Q13
What type of inheritance is shown in the program code?
Hierarchical Inheritance
Multiple Inheritance
Multilevel Inheritance
Single Inheritance
60s - Q14
What type of inheritance is shown in the image?
Single Inheritance
Multilevel Inheritance
Multiple Inheritance
Hierarchical Inheritance
60s - Q15
Which of the following program fragment can implement the type of inheritance shown in the given image?
60s