actually the problem is that i have to make a program for tollbooth
the format is cars passing the booth are expected to pay 50 cent toll. mostly they do but sometimes a car goes without paying. the tollbooth keeps track of the number of cars that have gone by, and of the total money collected.
i hav to use two data members one for total number of cars and the other for the total cash.
a member function payingcar() increments the car total and adds 0.50 to the cash total. anothjer member function called nopaycar() increments the car total but adds nothing to total cash.
i have to use one key to count a paying car and another key to count a non paying car. pushing Esc should cause the program to print out the total cars and total cash.
kindly guide me in these fields
1. give a hint of material of member functions
2. how to use keys for paying and non paying cars bcz i have used only numbers yet
3. what for Esc button bcz it does not appears in the editor