Car passing at bridge tollbooth should pay 500. Mostly they do but sometimes a car goes by without paying. Model this tollbooth with class called toolbooth, the two data items are of tye integer total number of cars,and a type of of double total amount collected. A constructor initialize both of the items ti zero,a member function called payingcar() increases the car total and add 500 to the cash total. Another function called nonpayingcar() increment the total but ass nothing to the total cash, finally a member function called display() to display the two total. Include a program to test this class.
josberty 0 Newbie Poster
Ketsuekiame 860 Master Poster Featured Poster
josberty 0 Newbie Poster
Ketsuekiame 860 Master Poster Featured Poster
josberty 0 Newbie Poster
Ketsuekiame 860 Master Poster Featured Poster
josberty 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.