Build the inheritance hierarchy

Assignment Help Accounting Basics
Reference no: EM13916642

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:

Reference no: EM13916642

Questions Cloud

What is it about project management : Think of a successful project and one unsuccessful project.What distinguishes those two, both in terms of the process used to develop them and their outcomes.
Cost assigned to ending inventory and to cost of goods sold : Determine the cost assigned to ending inventory and to cost of goods sold for the following. (Do not round weighted average per unit costs and round your answers to 2 decimal places.)
Affirmative action : Affirmative Action Affirmative action is one of the most controversial topics in employment law. How is affirmative action often presented in the media? How similar is that portrait to the one presented in Johnson v. Transportation Agency, Santa Clar..
Lower confidence level : How much money do winners go home with from the television quiz show Jeopardy? To determine an answer, a random sample of winners was drawn and the amount of money each won was recorded and listed below
Build the inheritance hierarchy : For the isDead method in HotRod, use the logic below to implement the inherited base class abstract method called isDead.
Proper amount of overhead had been applied : At that time, the job had consumed $4,300 of direct material and $900 of direct labor: Mr. Nemerson indicated that the proper amount of overhead had been applied to the job as part of the month-end process.
Write a well-organized letter to ms isabella cervantes : Write a well-organized letter to Ms. Isabella Cervantes, Manager, Convention Services, Caesars Palace, 257 Palace Drive, Las Vegas, NV 87551. Before writing, you might like to look at the Caesars Web site for information.
Corporate social responsibility and competitive advantage : According to "Strategy & Society: The Link Between Competitive Advantage and Corporate Social Responsibility," is there a correlation between corporate social responsibility and competitive advantage? Do you agree or disagree with the authors' con..
Prepare a response letter to be sent to owners : Prepare a response letter to be sent to owners who want to know how to earn the Healthy Dining rating for their restaurants.

Reviews

Write a Review

Accounting Basics Questions & Answers

  How much control does fed have over this longer real rate

Hubbard argues that the Fed can control the Fed funds rate, but the interest rate that is important for the economy is a longer-term real rate of interest.   How much control does the Fed have over this longer real rate?

  Coures:- fundamental accounting principles

Coures:- Fundamental Accounting Principles: - Explain the goals and uses of special journals.

  Accounting problems

Accounting problems,  Draw a detailed timeline incorporating the dividends, calculate    the exact Payback Period  b)   the discounted Payback Period. the IRR,  the NPV, the Profitability Index.

  Write a report on internal controls

Write a report on Internal Controls

  Prepare the bank reconciliation for company

Prepare the bank reconciliation for company.

  Cost-benefit analysis

Create a cost-benefit analysis to evaluate the project

  Theory of interest

Theory of Interest: NPV, IRR, Nominal and Real, Amortization, Sinking Fund, TWRR, DWRR

  Liquidity and profitability

Distinguish between liquidity and profitability.

  What is the expected risk premium on the portfolio

Your Corp, Inc. has a corporate tax rate of 35%. Please calculate their after tax cost of debt expressed as a percentage. Your Corp, Inc. has several outstanding bond issues all of which require semiannual interest payments.

  Simple interest and compound interest

Simple Interest, Compound interest, discount rate, force of interest, AV, PV

  Capm and venture capital

CAPM and Venture Capital

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd