Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

The contenders are Tortoise and Hare, and they begin race as investors at "tile 1" of 70 tiles The finish line is at 70 the tile. With each tick of the clock , the program should use function of moveTortoise and moveHare. The functions should use pointer-based pas-by-reference to modify the position of the tortise and the Hare. Use variable to keep track of the positions of the animals(i.e position numbers are 1-70). For each tick of the clock, display a 70-position line showing the letter T in the tortoise's position and letter H in the Hare's position.

Implement a class Tile with the following propertises:

  • Admission Cost(randomize cost between $3 and $10)
  • Tile Cost(randomize cost between $6 and $20)
  • Cost to build one Green hose(5 xTile Cost)
  • Green House Count
  • Investor *owner
  • void place(Investor*) - Function is called to place Investor on Tile

Implement a class Investor with the following propertises:

  • Name of Investor
  • Cash Savings Balance (initialize to $1500)
  • Total vale of assets(initialize to $0)
  • void savingsdeposit(double amount) - Deposits money into cash savings balance
  • void assetDeposit(double amount) - add to the vale of assets
  • double withdraw(double amount)

The race between two investors (Tortoise and Hare) who are both trying to race through a series of tiles without going bankrupt. If an investor goes bankrupt before they cross the finish line then they are out of the race. The investor who gets to the finish line first without going bankrupt will win a vacation away from the money making game.

RULES FOR LANDING ON A TILE:

  • If an investor lands on a tile and has sufficient money to purchase tile (provided the tile has not been sold), then the investor must purchase that Tile. Remember to update the total value of assets for this investor.
  • If an investor lands on a tile that is owned by a different investor then that investor must pay the admission cost to the owner.
  • If an investor lands on a tile that he/she already owns then it must try to purchase a Green House (remember to increment green house count)
  • If the investor doesn't have enough cash to purchase an available tile then do nothing.
  • The admission cost of a tile with one or more green house is:

Sample output after the race:

Investor: Hare

Cash Savings Balance: $5000

Total Value of Assets: $18000

Investor: Tortoise

Cash Savings Balance: $3000

Total Value of Assets: $4000

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9458268

Have any Question?


Related Questions in Computer Engineering

The gravitational attraction between any two objects in the

The gravitational attraction between any two objects in the universe is given by the following formula: Force of Gravity = (G * m * n) / r 2 Where  m  and  n  are masses of the objects in kilograms,  r  is the distance b ...

Nbspintroduction to software developmentusing only

Introduction to Software Development Using only Flowgorithm program. Please do not answer if you do not know the answer or you are nor sure .... I need only the Flowgorithm program. Rainfall statistics. Design a program ...

What is the role of arp and how does it cause a security

What is the role of ARP and how does it cause a security concern? What is the different between global and private IP addresses? How does using NAT change a private IP address into a global IP address, and why is this so ...

Design a combinational circuit with three inputs a b and c

Design a combinational circuit with three inputs: A, B, and C, D and the output W. The output should be 1 only when the values of A, B interpreted as an unsigned integer (AB) is equal to the values of C, D interpreted as ...

The standard bcd-to-7-segment decoder such as the 74ls47

The standard BCD-to-7-segment decoder (such as the 74LS47 used in the lab), has active-LOW outputs. Should the 7-segment display be common-anode or common-cathode? Why do you think the decoder is configured for active-LO ...

Please help with anbspfunctionnbspcodesymbol to convert

Please help with a function  codeSymbol , to convert each mark to a symbol (A, B, C, D, E, F) and a code (7,6,5,4,3,2,1) according to the table below. And call it in the main function. Use the table below to determine th ...

Question the chief technology officer cto has indicated

Question: The Chief Technology Officer (CTO) has indicated that your organization has been requested by the National Security Council (NSC) to comment on the upcoming National Cybersecurity Strategy. The NSC has asked fo ...

Describe how to discover cookies on web browsers what is a

Describe how to discover cookies on web browsers. what is a reverse DNS lookup and can it be used when attacking the network.

1 select one of the topics listed below and discuss

1. Select one of the topics listed below and discuss it. Describe an application that you have to solve by using at least 2 Excel functions. It can be Math, Statistics, Engineering, Financial, etc. Explain what Excel fun ...

Question after reading this weeks materials please respond

Question : After reading this week's materials, please respond to TWO of the following questions. CITATION IN APA 1. Compare mean time between repair (MTTR) and mean time between failures (MTBF). Why can more components ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As