Discount Get CIS 247A ALL WEEKS Solution ONLY $85.45 $113.93
CIS 247A iLab 1 - Creating a User Interface - Visual C# [$9.99]
CIS 247A iLab 2 - Object Construction and Data Abstraction - Visu... [$15.99]
CIS 247A iLab 3 - Overloaded Methods and Static Methods - Visual ... [$15.99]
CIS 247A iLab 4 - Composition and Class Interfaces - Visual C# [$15.99]
CIS 247A iLab 5 - Inheritance - Visual C# [$19.99]
CIS 247A iLab 6 - Abstract Classes - Visual C# [$19.99]
CIS 247A iLab 7 - Putting It All Together - Visual C# [$15.99]
Get Selected Weeks Solution with ONLY NOT Add Selected Tutorials To Cart
CIS247 CIS 247 CIS/247 CIS247A iLab 7: Putting It All Together - Visual C# 2010
    CIS247 CIS 247 CIS/247 CIS247A iLab 7: Putting It All Together - Visual C# 2010

CIS247 CIS 247 CIS/247 CIS247A iLab 7: Putting It All Together - Visual C# 2010

$15.99

iLab 7 of 7: Putting It All Together

Connect to the iLab here.

Submit your assignment to the Dropbox located on the silver tab at the top of this page.
(See Syllabus “Due Dates for Assignments & Exams” for due dates.)

i L A B O V E R V I E W
Scenario and Summary

This week, you will be implementing inheritance by creating a generic Racer base class along with two derived classes called StreetTuner and HotRod. You will make the Racer class abstract and include the abstract method IsDead() in the Racer class.

Deliverables

Due this week:
• Before you post your lab in the dropbox, copy your entire program into a Notepad file and post that. I do not need you to zip the project or give me screen shots of the output.
i L A B S T E P S
STEP 1: Understand the UML Diagram

STEP 2: Build the Inheritance Hierarchy

1. Create a project called “CIS247_WK7_Lab_LASTNAME”.
2. Build the class structure shown in the UML diagram. Remember to include properties for each class attribute.
STEP 3: Implement the Logic for the HotRod Class

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 to implement the base class abstract IsDead method.
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();

Pseudocode for the IsDead method of HotRod
Random rnd = new Random();
boolean dead

if (speed > 50 && rnd.NextDouble() > 0.6)
if (engineHorsePower < 300 && blower=true)
dead = false
else
dead = true
end if
else if (speed > 100 && rnd.NextDouble() > 0.4)
if (engineHorsePower >= 300 && blower = true)
dead = true
else
dead = false
end if
else
dead = false
end if
STEP 4: Implement the logic for the StreetTurner class

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 StreetTurner, use the logic below to implement the inherited abstract base class method called IsDead.

Pseudocode for the IsDead method of StreetTuner
Random rnd = new Random();
boolean dead
if (speed > 50 && rnd.NextDouble() > 0.6)
if (engineHorsePower < 300 && nitrous=true)
dead = false
else
dead = true
end if
else if (speed > 100 && rnd.NextDouble() > 0.4)
if (engineHorsePower >= 300 && nitrous = true)
dead = true
else
dead = false
end if
else
dead = false
end if
STEP5: Construct the Main Program

1. Create an array of Racer objects that will hold two 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:
a. Racer name;
b. Racer Speed;
c. Number of cylinders in the racer’s engine;
d. Horsepower of the racer’s engine; and
e. Nitrus or blower option, depending on the type of Racer object.
[Hint: In order to be able to collect all information for the derived classes as well, consider creating a base class method called ReadRacerData in the Racer class, which you will then override in the derived classes to capture the required info per class. Call the ReadRacerData method within the CollectRacerInformation method.]
3. Write a method called “DisplayRacerInformation” that accepts as an argument a Racer object, and then displays all of the information for the specific racer type.
4. Create a racer object of each type, and invoke the CollectRacerInformation passing in the Racer object. Then, store each object in the array.
5. Iterate through the Racer array list and, for each Racer, display all of the Racer’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

When done, compile and run your program.
Then, debug any errors until your code is error-free.
Check your output to ensure that you have the desired output and modify your code as necessary and rebuild. Your code may resemble the following:

STEP 7: Submit Deliverables

• Before you post your lab in the dropbox, copy your entire program into a Notepad file and post that. I do not need you to zip the project or give me screen shots of the output.
Submit your lab to the Dropbox located on the silver tab at the top of this page. For instructions on how to use the Dropbox, read these Step-by-Step Instructions or watch this Dropbox Tutorial.

See Syllabus “Due Dates for Assignments & Exams” for due date information.

My tutorial contains Visual Studio C# 2010 Project and Text Document of Program.

If you have more questions, please contact me via email support@extutorials.com

I will help you any time

Thank you !

Attached Files

Move over [ preview ] file name to preview content in it!

  • CIS247_WK7_Lab_LASTNAME.zip [257KB]
    • CIS247_WK7_Lab_LASTNAME
      • CIS247_WK7_Lab_LASTNAME
        • bin
        • CIS247_WK7_Lab_LASTNAME.csproj [2.7KB]
        • LogicTier
          • HotRod.cs [1.5KB] [ preview ]
          • Racer.cs [2KB] [ preview ]
          • StreetTuner.cs [1.6KB] [ preview ]
        • obj
        • Presentation Tier
          • ApplicationUtilities.cs [1.2KB] [ preview ]
          • InputUtilities.cs [3KB] [ preview ]
        • Program.cs [2.7KB] [ preview ]
        • Properties
          • AssemblyInfo.cs [1.4KB] [ preview ]
      • CIS247_WK7_Lab_LASTNAME.sln [0.9KB]
      • CIS247_WK7_Lab_LASTNAME.suo [42.4KB]
    • CIS247_WK7_Lab_LASTNAME.txt [8KB] [ preview ]

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



PURCHASE SAVE
2 Tutorials 10%
3 Tutorials 13%
4 Tutorials 16%
5 Tutorials 19%
6 Tutorials 22%
7 Tutorials 25%
8 Tutorials 28%
9 Tutorials 31%
10 Tutorials 34%
add url more

9MZQASHWN73B