Code:
# include <iostream>
# include <conio.h>
using namespace std;
class tollbooth
{
private:
long int total_cars;
float total_cash;
public:
void payingcar()//inline function
{
total_cars++;
total_cash+=0.50;
}//end of function
void nonpayingcar()//inline function
{
total_cars++;
}//end function
void print () const//inline function
{
cout<<"total cars passed:"<<total_cars<<endl;
cout<<"total cash received:"<<total_cash<<endl;
}//end function
};//end class
int main ()
{
tollbooth lahore;
char push_key,a,b;
if (push_key==a)
{
lahore.payingcar();
}//end if
else if (push_key==b)
{
lahore.nonpayingcar();
}//end else
getch ();
}//end main