Many gas pumps have displays that spin digits (either analog or digital) while the gas is being pumped into your car’s gas tank. The display’s digits change to indicate the amount of gas in the tank and the current price.

Write a program that displays the spinning of the digits. Your GasPumpDisplay class will allow you to create a “gas pump” display with a specified number of display places and will allow you to specify the highest digit in use. You will simplify a gas pump display by using a smaller display of only three digits where the digits are in the limited range of  0 – 4 inclusive.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *