Assignment No. 3

Variables and Data Types

Miles Per Gallon Calculator

Operation

         The user enters values for the number of gallons of gas a car can hold and the number of miles it can be driven on a full tank.

         When the user clicks on the Calculate MPG button, the form displays the carís mileage in miles per gallon.

         When the user clicks on the Clear button, all inputs and outputs are cleared.

         When the user clicks on the Exit button, the application terminates.

Specifications

         The formula for calculating mileage is (miles driven) / (gallons of gas used).

         Load all inputs into variables, complete the necessary calculations using variables, and load the output from a variable.

         The input controls should be text boxes and the output control should be a label.

         The application should accept fractional decimal values like 10.5 and 200.65 for the user entries.

         Assume that the user will enter valid numeric data.

         Visual Studio will create a solution folder containing several files and folders. Compress the solution folder into a single Zip file and upload it to Canvas.