Question: Instructions You've just received a crash course in Java. You may be completely new to this, or you may have only learned one or two
Instructions You've just received a crash course in Java. You may be completely new to this, or you may have only learned one or two new things. In any case, it's key that you cement your newfound knowledge with practice. Now we're going to take some time to practice writing some simple Java programs. In doing so, you will become familiar with Eclipse and how to run your applications. Create a Java project in eclipse, called "PracticeCar" Create a class called "Simulator", with a main() method. Create a "Car" class, with a run() method. The main() method of Simulator will create an instance of a car object, and call that object's run() method. Now, you will create additional classes that represent the different components of a car - the engine, the fuel tank, the wheels, etc. These classes should have methods related to their behaviors, and properties representing their various states (an engine is running or not, tires have levels of wear, etc). Every class representing a car part should inherit from a superclass called "CarPart." The CarPart class will have all of the states and behaviors that are shared by all types of car parts (like condition and the ability to print a diagnostic report). Make sure that your Car class creates an instance of each CarPart subclass, as part of its constructor. Parts that a car has multiples of (like wheels) should be stored in a collection. Make sure that the run() method of the Car class does something with each instance of a CarPart subclass. Many of the design details for this task will be up to you - this is an exercise to help you get into the habit of thinking in an object-oriented way, so get creative! There are no additional requirements for the functionality of the program, save that it actually works when executed. When you are done, ZIP it and upload it. NOTE: You can create an archive (.zip) of your project from within Eclipse. Please right-click on the project and select Export and follow the prompts to export a .zip of your project for upload.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
