
CompProg2 CP2 Assessment
Quiz by Maria Lolita Masangcap
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
In the image, there are different companies that produce distinct classifications of cars. As shown, the black car represents a/an ________.
In the image, there are different companies that produce distinct classifications of cars. As shown, the different colors of cars represent the ________.
In the given image, what is the name of the class?
In the given image, name, type, color, and numPetals are the ____________ of the declared class.
In the given image, growing() and produceSeed() are the ____________ of the declared class.
(1) __________ itself does nothing but the real functionality is achieved through their (2) ____________.
In the given image, what step of object creation is represented by the statement inside the rectangle?
Every class in java is considered as an implementation of the concept of ____________________.
In the given program code in the image, identify the variables that are encapsulated in the class and cannot be accessed by other classes.
Say that there are three classes: Computer, MacComputer, and IBMComputer. What are the likely relationships between these classes?
Which of the following is a correct syntax of defining a new class myIpad that inherits the parent class AppleDevice?
What type of inheritance is shown in the program code?
What type of inheritance is shown in the program code?
What type of inheritance is shown in the image?
Which of the following program fragment can implement the type of inheritance shown in the given image?
Which of the following statements is NOT TRUE about inheritance in Java?
To create an abstract class, __________ keyword is used in its declaration.
What is wrong with the given program fragment in the image?
If a class ClassKo inherits the given abstract class MyClass, what must be done in class ClassKo?
Polymorphism happens when _____________________.
What is the process of defining a method in a child class having the same name and arguments as a method in its parent class?
Given the program code, what will be displayed on the screen?
A class Animal and its child class Bird both have a method animalSound(). If test is an object of the type Bird, what will the following code do?
test.animalSound()
Given the program code in the image, what will be displayed on the screen?
What type of polymorphism is achieved in the given program code?
The + operator in Java is _____________ to perform numeric addition as well as string concatenation.
Refers to the current object in a method or constructor
What is true about using the super keyword in a constructor?
Which of the following statements is invalid?
Can an object be a subclass of another object?