4: Object-oriented programming

Question 1

Classes have a special method that serves as a blueprint for creating objects of that class. What is the method called?

Question 2

Which of the following statements about interfaces and abstract classes is NOT correct?

Question 3

Which of the following is NOT a Kotlin visibility modifier for properties, methods, etc.?

Question 4

Consider this data class:

data class Fish(val name: String, val species:String, val colors:String)

Which of the following is NOT valid code to create and destructure a Fish object?

Question 5

Let's say you own a zoo with lots of animals that all need to be taken care of. Which of the following would NOT be part of implementing caretaking?

Last updated