Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. A Form with title bar showing Calorie Counter. (The title bar usually shows Form1) It calculates the calorie content of a food item, based

1. A Form with title bar showing Calorie Counter. (The title bar usually shows Form1) It calculates the calorie content of a food item, based on user specifying amount (by weight, in grams) of protein, carb and fat in the food item.

Three labelled textboxes for input, for entering grams of protein, carbohydrates, and fat respectively. Each gram of fat is nine calories, and each gram of protein or carb is four calories.

Display the total calories in a read-only textbox.

Buttons to Calculate, Clear, and Exit.

Clear clears inputs and outputs, and sends focus to the first textbox.

labelled textbox : if user is expected to enter name into a textbox, a label next to the textbox shows Name ( this is just illustrating what a labelled textbox is, and not asking you to support user entering name )

Requirments/Guidelines

image text in transcribed

This lab emphasizes choice of correct numeric type (int or double). Guidelines below are copied over from the Note on Transcripts page: use integer only when: 1. problem specifies integer type. example: 'user enters an integer input.' 2. the nature of the data indicates it can never have a fractional part. example: the number of books ordered, the number of students in a class. Don't be misled by any numbers I may have used in the question; focus on the nature of the underlying item. For example, if the height of a wall is the item in question, and I give examples as 10, 12 and 15 feet, what you need to ask yourself is: can that height also have a fractional part? If the input to an app is specified as a particular type, but a computation within the app requires a different type, the correct approach is to convert the value of the variable, prior to computation, to the appropriate type. In particular, you should not force a change of the input type to match the computation's type. Input type must conform to what is specified

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

how would you have done things differently?

Answered: 1 week ago

Question

3. What information do participants need?

Answered: 1 week ago