OOP: Cars

  • 8
  • Locked
Let's categorize cars. Create classes for affordable and expensive cars, and then make the Ferrari and GeoMetro classes inherit them as you see fit (but please note that the CodeGym code validator has a definite opinion on the matter). We'll implement printlnDesire methods in these classes that will tell us the secret desires of their drivers.
You can't complete this task, because you're not signed in.
Comments (4)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Samuel Michael
Level 16 , Stafford, United States
Expert
26 February 2021, 02:50
Can anyone explain what the point of this exercise is? Why do the descendant classes have to have wider accessibility relative to the parent class?
Guadalupe Gagnon
Level 37 , Tampa, United States
30 October 2021, 01:36
"visibility is expanded" does not equal "visibility is wider than"
Devonte A
Level 18 , Rubery, United Kingdom
7 July 2020, 08:13
I would have thought that the public access modifier has the widest scope?
Samuel Michael
Level 16 , Stafford, United States
Expert
26 February 2021, 02:50
I think it does.