SHWOO 25 Junior Poster in Training

ahnoldschwarz said he wants to be a game designer, not a game programmer. I would start out by learning the basic concepts of programming, i.e. variables, control statements, and other concepts that are apparent in just about any language. I would then go on to learn a scripting language such as Python, Ruby, or Lua.

Game designers generally do not do a whole lot of programming in most projects. When they do write some code it is usually writing up scripts for designing a game level or things of that nature.

If you want to get into game design you should build your skills in the area of game documentation and practice making clear, informative, and practical documentation. Work on building any kind of prototype you can to get a feel for the things that may work well in your design and things that may need to be changed or eliminated. I don't understand why everyone is suggesting all of these different programming languages to someone who desires to get into game design.

Salem commented: Spot on!! Excellent. +25
SHWOO 25 Junior Poster in Training

Can anyone figure out why I get -9.032654e something from my biWeeklySalary function?

#ifndef EMPLOYEE_H
#define EMPLOYEE_H

#include "HireDate.h"

#include <string>
using std::string;

class Employee
{
public:
    Employee();
    Employee( const string &, const string &, const string &, const HireDate & );
    ~Employee();

    void setFirstName( const string & );
    string getFirstName() const; 

    void setLastName( const string & );
    string getLastName() const;

    void setSocialSecurityNumber( const string & );
    string getSocialSecurityNumber() const;

    void print() const;

private:
    string firstName;
    string lastName;
    string socialSecurityNumber;
    const HireDate hireDate;
};

#endif
#include <iostream>
using std::cout;
using std::endl;

#include "Employee.h"
#include "HireDate.h"
#include "MailCarrier.h"

//constructor
Employee::Employee()
{

}

//Constructor 
Employee::Employee(const string &first, const string &last, const string &ssn, const HireDate &dateOfHire )
    : firstName( first ), lastName( last ), socialSecurityNumber( ssn ), hireDate( dateOfHire )
{

}

Employee::~Employee()       //destructor
{

}

//function to set Employee's first name
void Employee::setFirstName( const string &first )
{
    firstName = first;
}

//function to get Employee's first name
string Employee::getFirstName() const
{
    return firstName;
}

//function to set Employee's last name
void Employee::setLastName( const string &last )
{
    lastName = last;
}

//function to get Employee's last name
string Employee::getLastName() const
{
    return lastName;
}

// function to set Employee's Social Security Number
void Employee::setSocialSecurityNumber( const string &ssn )
{
    socialSecurityNumber = ssn;
}

//function to get Employee's Social Security Number
string Employee::getSocialSecurityNumber() const
{
    return socialSecurityNumber;
}

//function to print Employee object
void Employee::print() const
{
    cout << "Employee: " << getFirstName() << ' ' << getLastName()
        << …
SHWOO 25 Junior Poster in Training

I have instantiated an object, bob, and have an array with hours for each day bob has worked. When I try to call bob.biWeeklySalary( hours[] ) it doesn't work. I'm not really sure how to use the array here. The compiler just says that hours is an undeclared identifier.

Your help is very appreciated

#include <iostream>
using std::cout;
using std::endl;


#include "MailCarrier.h"
#include "HireDate.h"
#include "Employee.h"

int main()
{
    HireDate bobHire( 4, 8, 2004 );

    MailCarrier bob( "Bob", "Johnson", "534-44-9551", bobHire, 19.52 );

    bob.getHoursFromUser();

    bob.biWeeklySalary(  );

    bob.Employee::print();
}
#ifndef MAILCARRIER_H
#define MAILCARRIER_H

#include "Employee.h"
#include "HireDate.h"

#include <iostream>
using std::cout;
using std::endl;

class MailCarrier : public Employee
{
public:
    MailCarrier();
    MailCarrier( const string &, const string &, const string &, const HireDate &, double );

    void setPayRate( double );
    double getPayRate() const;

    void getHoursFromUser();

    double biWeeklySalary( double );

private:
    double payRate;
    double hours[12];
    double totalPay;

};
#endif
#include <iostream>
using std::cout;
using std::cin;
using std::endl;

#include "MailCarrier.h"

//Constructor
MailCarrier::MailCarrier()
{
    for (int i = 0; i <= 12; i++)
        hours[i] = 0;
}

//Constructor
MailCarrier::MailCarrier( const string &first, const string &last, const string &ssn,
                        const HireDate &, double pay )
    //explicitly call base-class constructor
    : Employee( first, last, ssn, HireDate( ) )
{
    setPayRate( pay ); // validate and store payRate
}

// function to set payRate
void MailCarrier::setPayRate( double pay )
{
    payRate = ( pay > 0.0 && pay < 35.0 ) ? pay : 17.17;
}

double MailCarrier::getPayRate() const
{
    return payRate;
} …