+ 1

Object Oriented Programming for Java

Last 2 steps. Help: 1. Make sure that your Car class creates an instance of each CarPart subclass, as part of its constructor. These instances should be added to a collection of CarPart reference variables. 2. The run() method of your Car class should iterate through the Car’s collection of CarPart references, which stores the instances of the CarPart subclass. On each iteration, the function() method of the current object in the collection should be invoked. https://code.sololearn.com/cQ9DDTQU6apr/?ref=app

16th Feb 2021, 10:01 PM
Guy Robbins
1 Odpowiedź
0
For clarification on my post this is a project I am working on and was able to do all steps correctly but I am having trouble with the last 2 steps. Any help will greatly be appreciated.
16th Feb 2021, 10:05 PM
Guy Robbins