Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CHAPTER 3 PROGRAMMING PROJECTS Write a program that allows the user to specify two numbers and then adds, subtracts, or multiplies them when the user

CHAPTER 3 PROGRAMMING PROJECTS
Write a program that allows the user to specify two numbers and then adds, subtracts, or multiplies them when the user clicks on the appropriate button. The output should give the type of arithmetic performed and the result. See Fig. 3.18. Note: If one of the numbers in an input text box is changed, the output text box should be cleared.
FIGURE 3.18 Possible outcome of Programming Project 1.
FIGURE 3.19 Possible outcome of Programming Project 2.
Suppose automobile repair customers are billed at the rate of $35 per hour for labor. Also, suppose costs for parts and supplies are subject to a 5% sales tax. Write a program to display a simplified bill. The customer's name, the number of hours of labor, and the cost of parts and supplies should be entered into the program via text boxes. When a button is clicked, the customer's name and the three costs should be displayed in a list box, as shown in Fig. 3.19.
W/rite a program to make change for an amount of money from 0 through 99 cents input by the user. The output of the program should show the number of coins from each denomination used to make change. See Fig. 3.20.
FIGURE 3.20 Possible outcome of Programming Project 3.
FIGURE 3.21 Possible outcome of Programming Project 4.
Write a program to convert a U.S. Customary System length in miles, yards, feet, and inches to a Metric System length in kilometers, meters, and centimeters. A sample run is shown in Fig. 3.21. After the numbers of miles, yards, feet, and inches are read from the text boxes, the length should be converted entirely to inches and then divided by 39.37 to obtain the value in meters. The Int function should be used to break the total number of
Programming Projects
101
meters into a whole number of kilometers and meters. The number of centimeters should be displayed to one decimal place. The needed formulas are as follows:
total inches =63360** miles +36** yards +12** feet + inches
total meters = total inches ?39.37
kilometersI=nt( meters ?1000)
image text in transcribed

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

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions