Test: Jfo Section 2 Quiz
Test: Jfo Section 2 Quiz
Section 2 Quiz
(Answer all questions in this section)
1. In the code example below, identify any methods: Mark for Review
empId
salary
displaySalary() (*)
Correct
2. In object oriented programming, there is an emphasis on which of the following two: Mark for Review
(1) Points
Creation of procedures.
Writing algorithms.
Correct
3. An object may interact with another object by invoking methods. Mark for Review
(1) Points
True (*)
False
Correct
4. You have a beautiful garden at home. On Sunday, you start budding your rose plant to make few more Mark for Review
samples of rose plants to plant in the garden. Can you categorize how this scenario could be represented
by classes and instances? (1) Points
Rose plant is the object and samples are not instances of the plant because they have not grown yet.
Rose plant is the class and the samples generated from the rose plant are instances of that class. (*)
Samples of the rose plant are called classes and not the actual rose plant.
Samples are the class and the rose plant is the instances of samples.
https://myacademy.oracle.com/player/play?in_sessionid=28539411210A51AJ&classroom_id=74941470 1/2
4/25/2021
p p p
JFo Section 2 Quiz
Correct
5. There are several fields and methods in a Shirt class. Which of the following could be a method in the Mark for Review
Shirt class?
(1) Points
size
color
getShirtSize() (*)
price
Correct
https://myacademy.oracle.com/player/play?in_sessionid=28539411210A51AJ&classroom_id=74941470 2/2