Need help with a program

The professor at my college has once again assigned something he did not teach to us. If he did we couldn't understand him or read his handwriting as he is new to the country. Can anyone help me understand how to do this and which methods to use?

Create a header file and a CPP file and write a simple application program for the following CLASS. The program uses the class you just created.

Class name: (YourName)IncomeGoal

The object has three items: name, base_income, yearsOfTraining

Function:

1. Show the IncomeGoal with this formula: IncomeGoal = base_income*(years +1)
2. Show your name
3. Show base income

I have tried writing a header file for the class in code blocks but nothing I do seems to work. I'm not sure if we were supposed to pass by value or reference or what he really wanted us to do.
I have tried writing a header file for the class in code blocks but nothing I do seems to work

If you show us what you did, then we might see why it does not work.
// header
#include <iostream>
class nameIncomeGoal
{
public:
IncomeGoal();
IncomeGoal();
float base_income();
float years();
float product();
float name();

};

// end of header

Note: The use of code tags is strongly recommended.

Your class has no data members.

You were asked to include three function members. You show six (but one is twice). Do their return types make sense?

How about a constructor and or modifying data members?
Topic archived. No new replies allowed.