CIS 247 DeVry Week 7 iLab latest
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
2. For the isDead() method in StreetTuner, use the logic below to implement the inherited base class abstract method<br />
called isDead.<br />
STEP 5: Construct the Main Program<br />
Create an array of Racer objects that will hold three Racer objects.Hint: When completing the Main Class for your lab,<br />
feel free to reuse old methods from previous labs!<br />
1. Write a method, called collectRacerInformation that accepts as an argument a Racer object, and then prompts the<br />
user to provide the following information for each racer.<br />
<br />
<br />
<br />
<br />
Racer name<br />
Racer Speed<br />
Number of cylinders in the racer's engine<br />
Horsepower of the racer's engine<br />
2. Add logic to collectRacerInformation to determine if the Racer object passed in is a HotRod or a StreetTuner. If it is<br />
a HotRod, prompt the user to indicate the existence of a blower. If the object is a StreetTuner, prompt the user to<br />
indicate the existence of nitrous. Set these values appropriately.<br />
3. Write a method called displayRacerInformation that accepts as an argument a Racer object, and then displays all<br />
the information for the specific racer type.<br />
4. Create any combination of Racer objects (make sure you create at least one StreetTuner and one HotRod) and<br />
invoke collectRacerInformation, passing in each of the Racer objects. Store each object in the array. For StreetTuner<br />
objects, be sure to set the nitrous flag (either true or false), and for the HotRod objects set the blower flag (either true<br />
or false).<br />
5. Iterate through the racer array and, for each Racer object, display all the object's attribute information (call the<br />
displayRacerInformation method for each object). Don't forget to indicate whether or not the Racer is dead!<br />
STEP 6: Compile and Test<br />
When done, compile and execute your code, and debug any errors until your code is error-free.<br />
Check your output to ensure that you have the desired output, modify your code as necessary, and rebuild.<br />
Your code may resemble the following:<br />
STEP 7: Submit Deliverables<br />
.equella.ecollege.com/file/74450de3-75b7-46fc-a819-b5c088633d4c/1/<strong>CIS</strong><strong>247</strong>B_W7_<strong>iLab</strong>.html#top">Back to Top<br />
Submit your lab to the Dropbox located on the silver tab at the top of this page. For instructions on how to use the<br />
Dropbox, read these.next.ecollege.com/default/launch.ed?ssoType=DVUHubSSO2&node=184">step-by-step<br />
instructions