I'm really confused with the program

The professor already has given us the main.cpp file all I need to do is write the implementation file, but I really don't know how to write it. I have some code, but I don't know what to do its like my brain freezes when I try to write it. Its a toll booth student program where the user enters how many courses and see how many students entered the room, which students paid and which students didn't. Also I need to check for validation where if the amount of students paid is greater than the students that entered the room. I will show you what I have so far. Im still trying to figure it out, but I can't I know its simple, but Im new to static member variables and static member functions

How many courses maximum? 6
Now creating an uninitialized course element ....
Now creating an uninitialized course element ....
Now creating an uninitialized course element ....
Now creating an uninitialized course element ....
Now creating an uninitialized course element ....
Now creating an uninitialized course element ....
Enter 'y' to initialize new course data; any other character to quit: y
For course 1:
How many students entered the room? 5
How many students paid? 4
Enter 'y' to initialize new course data; any other character to quit: y
For course 2:
How many students entered the room? 6
How many students paid? 3
Enter 'y' to initialize new course data; any other character to quit: y
For course 3:
How many students entered the room? 7
How many students paid? 2
Enter 'y' to initialize new course data; any other character to quit: y
For course 4:
How many students entered the room? 8
How many students paid? 1
Enter 'y' to initialize new course data; any other character to quit: q
For course 1:
5 students are in the course
The toll collected is $2.00
1 students didn't pay
For course 2:
6 students are in the course
The toll collected is $1.50
3 students didn't pay
For course 3:
7 students are in the course
The toll collected is $1.00
5 students didn't pay
For course 4:
8 students are in the course
The toll collected is $0.50
7 students didn't pay
The average toll per course is $1.25

//header file
class TollBooth
{
private:
int m_nPayingStus; //number of students who paid
int m_nDeadbeatStus;//number of students who didnt paid
static int m_nCourseCount;
static int m_totalPay;
int studentCount; //number of tollbooth instances

public:
//default constructor
TollBooth();
//Overload Constructor
TollBooth(int, int, int);
static int getCourseCount();
static int getTotalPay();
int getNumDeadBeats();
int getNumStudents();
int calcTollCollected();
void setInputs();

};

//implementation file
#include "toll.h"

int TollBooth::m_nCourseCount = 0;
int TollBooth::m_totalPay = 0;

//default
TollBooth::TollBooth()
{
m_nPayingStus = 0;
m_nDeadbeatStus = 0;
}

//overload
TollBooth::TollBooth(int payStu, int deadStu, int stuCount)
{
payStu = m_nPayingStus;
deadStu = m_nDeadbeatStus;
stuCount = studentCount;
}

int TollBooth::getCourseCount()
{
return m_nCourseCount;
}

int TollBooth::getTotalPay()
{
return m_totalPay;
}

int getNumDeadBeats()
{

}

int getNumStudents()
{

}

int calcTollCollected()
{

}

void setInputs()
{

}
closed account (48T7M4Gy)
First of all you need code tags around your 'program'

But by the look of it there is a lot to do aside from static matters. I'd suggest you actually code up what you can - which is quite a lot and then ask if you have any specific questions.

If it's just a matter that you don't know because you are a beginner then pull out your lecture notes and a text book. Maybe watch a relevant video on YouTube.

Thank you. I did watch a video on youtube and look at my notes again and again until it made sense. I was able to write the program
closed account (48T7M4Gy)
So where's the problem we can help you with?
closed account (48T7M4Gy)
http://www.learncpp.com/cpp-tutorial/811-static-member-variables/
Topic archived. No new replies allowed.