I am currently working on a lab for class as follows;
A. Use Tiles instead of squares.
B. The Tortoise and the Hare are Real Estate Investors
Implement a class Tile with the following properties
Admission Cost (randomize cost between $3 and $10)
Tile Cost (randomize cost between 6 and $20)
Cost to build one Green House (5 x Tile Cost)
Green House Count
Investor *owner
void place(Investor *) – Function is called to place Investor on Tile
Implement a class Investor with the following properties:
Name of Investor
Cash Savings Balance (initialize to $15000)
Total value of Assets (initialize to $0)
void savingsDeposit(double amount ) – Deposits money into cash savings balance.
void assetDeposit(double amount) – add to the value of assets.
double withdraw(double amount)
I am a little lost as to how I should code my .h files specially my Investor.h here is the code for that file;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#include <string>
const int RACE_END = 70;
class Investor
{
public:
Investor();
void savingsDeposit(double amount);// deposits money into cash savings balance
void assetDeposit(double amount);// add to the value of assets
double withdraw(double amount); // withdraws money from accounts
double cashSavingBalance(double balance);// initialize to $0
double totalValueAssets(double value); // initialize to $15000
string investorName(string name); // name of investor
private:
string inName; // investor name
double aDeposit;// asset deposit
double sDeposit;// savings deposit
double aValue; // asset value
double sBalance;// savings balance
double moneyOut;// withdraw
};
|
I would like to get a second opinion see if i am in the right path, or if you guys have any suggestions thanks in advance.