Cash-back offer from April 14th to 21st, 2024: Get a flat 10% cash-back credited to your account for a minimum transaction of $50.Post Your Questions Today!

Question DetailsNormal
$ 40.00

CIS 247 Week 7 lab | Complete Solution

Question posted by
Online Tutor Profile
request

Week 7 lab

Due this week:

•   Capture the console output window and paste it into a Word document.

•   Zip the project folder.

•   Put the zip file and screenshots (Word document) in the Dropbox.

 

iLAB STEPS

STEP 1: Understand the UML Diagram

Back to Top

 

STEP 2: Build the Inheritance Hierarchy

Back to Top

Create a project called "CIS247B_WK7_Lab_LASTNAME"

Build the class structure shown in the UML diagram. Remember to include getters and setters for each class attribute.

STEP 3: Implement Logic for HotRod Class

Back to Top

1  Provide suitable logic for the toString method. As always, the toString method should reveal the state of an object.

2  For the isDead method in HotRod, use the logic below to implement the inherited base class abstract method called isDead.

Hint: To generate a random number, use the following code, which returns a random number from 0 to 1:

Random rnd = new Random();

rnd.NextDouble();

 

STEP 4: Implement Logic for StreetTuner Class

Back to Top

1  Provide suitable logic for the toString method. As always, the toString method should reveal the state of an object.

2  For the isDead() method in StreetTuner, use the logic below to implement the inherited base class abstract method called isDead.

 

STEP 5: Construct the Main Program

Back to Top

Hint: When completing the Main Class for your lab, feel free to reuse old methods from previous labs!

1  Create an array of Racer objects that will hold three Racer objects.

2  Write a method, called collectRacerInformation that accepts as an argument a Racer object, and then prompts the user to provide the following information for each racer.

◦                   Racer name

◦                   Racer Speed

◦                   Number of cylinders in the racer's engine

◦                   Horsepower of the racer's engine

3  Add logic to collectRacerInformation to determine if the Racer object passed in is a HotRod or a StreetTuner. If it is a HotRod, prompt the user to indicate the existence of a blower. If the object is a StreetTuner, prompt the user to indicate the existence of nitrous. Set these values appropriately.

4  Write a method called displayRacerInformation that accepts as an argument a Racer object, and then displays all the information for the specific racer type.

5  Create any combination of Racer objects (make sure you create at least one StreetTuner and one HotRod) and invoke collectRacerInformation, passing in each of the Racer objects. Store each object in the array. For StreetTuner objects, be sure to set the nitrous flag (either true or false), and for the HotRod objects set the blower flag (either true or false).

6  Iterate through the racer array and, for each Racer object, display all the object's attribute information (call the displayRacerInformation method for each object). Don't forget to indicate whether or not the Racer is dead!

STEP 6: Compile and Test

Back to Top

When done, compile and execute your code, and debug any errors until your code is error-free.

Check your output to ensure that you have the desired output, modify your code as necessary, and rebuild.

Your code may resemble the following:

Available Answer
$ 40.00

[Solved] CIS 247 Week 7 lab | Complete Solution

  • This solution is not purchased yet.
  • Submitted On 22 Jun, 2015 10:05:44
Answer posted by
Online Tutor Profile
solution
This Tutorial is rated A+ p...
Buy now to view the complete solution
Other Similar Questions
User Profile
Exper...

CIS 247 Week 7 lab | Complete Solution

This Tutorial is rated A+ previously,if you have any questions regarding this tutorial then you can contact me....

The benefits of buying study notes from CourseMerits

homeworkhelptime
Assurance Of Timely Delivery
We value your patience, and to ensure you always receive your homework help within the promised time, our dedicated team of tutors begins their work as soon as the request arrives.
tutoring
Best Price In The Market
All the services that are available on our page cost only a nominal amount of money. In fact, the prices are lower than the industry standards. You can always expect value for money from us.
tutorsupport
Uninterrupted 24/7 Support
Our customer support wing remains online 24x7 to provide you seamless assistance. Also, when you post a query or a request here, you can expect an immediate response from our side.
closebutton

$ 629.35