Akisha L.

asked • 02/09/21

Programming GUI

A. Name and Address


Design a GUI program that displays your name and address when a button is clicked. The program’s


window should appear as the sketch on the left side of Figure 17-9 when it runs. When the user clicks the


Show Info button, the program should display your name and address, as shown in the sketch on the right


side of the figure.


Figure 17-9 Name and Address program




B. Miles-per-Gallon Calculator


Design a GUI program that calculates a car’s gas mileage. The program’s window should have text boxes


that let the user enter the number of gallons of gas the car holds, and the number of miles it can be driven


on a full tank. When a Calculate MPG button is clicked, the program should display the number of miles


that the car may be driven per gallon of gas. Use the following formula to calculate milesper-gallon:


MPG = Miles/Gallons




C. Design an event handler that will execute when the showNameButton component is clicked. The event


handler should perform the following:


 Store your first name in a label component named firstNameLabel.


 Store your middle name in a label component named middleNameLabel.


 Store your last name in a label component named lastNameLabel.


(Remember, to store a value in a label component, you must store the value in the component’s Text property.)

Patrick B.

source code uploaded to RESROUCES section under this link... No diagram given... therefore, problems A and C are identical
Report

02/09/21

1 Expert Answer

By:

Patrick B. answered • 02/09/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.