1. Learn
  2. /
  3. Courses
  4. /
  5. Programming Paradigm Concepts

Connected

Exercise

Public vs. private attributes

Excellent! Your coworker has decided to use object-oriented programming for the banking app they are working on. Now they need your help with implementing one of their classes, which is going to require both public and private attributes.

Instructions 1/2

undefined XP
    1
    2
  • Start by implementing the price attribute of the Car class, which should be public.