Skills101
← All practice quizzes

Quiz: What Is OOP

5 questionsNo time limitPass: 60%+10 XP on first pass

Why object-oriented programming exists, procedural vs OOP, classes and objects with one real example in Python and Java, and an overview of the four pillars.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    A class is best described as:

  2. Question 2

    What does this print?

    class Counter:
        def __init__(self):
            self.n = 0
        def tick(self):
            self.n += 1
    a, b = Counter(), Counter()
    a.tick(); a.tick(); b.tick()
    print(a.n, b.n)
    
  3. Question 3

    Which pillar means "show what it does, hide how it works"?

  4. Question 4

    Which is NOT a benefit of OOP?

  5. Question 5

    An object's data (like speed or brand) is called its: