Create a project that calculates the total of fat, carbohydrate, and protein calories. Allow the user to enter (in text boxes) the grams of fat, the grams of carbohydrates, and the grams of protein. Each gram of fat is nine calories; a gram of protein or carbohydrate is four calories. Display the total calories for the current food item in a text box. Use two other text boxes to display an accumulated sum of the calories and a count of the items entered.
Form: The form should have three text boxes for the user to enter the grams for each category. Include labels next to each text box indicating what the user is to enter. Include buttons to Calculate, to Clear the text boxes, to Print the Form, and to Exit. Make the form’s Text property “Calorie Counterâ€. Code: Write the code for each button. Make sure to catch any bad input data and display a message box to the user.