Wallpaper Warehouse Exercise 6-12 Zak's Programming with Microsoft Visual Basic 2019/2022

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ย. 2024
  • In this exercise, you create an application that calculates the number of single rolls of wallpaper required to cover a room. Create a Windows Forms application. Use the following names for the project and solution, respectively: Wallpaper Project and Wallpaper Solution. Save the application in the VB9e\Chap06 folder.
    Create the interface shown in Figure 6-53. The four combo boxes have the DropDown style. Display numbers from 8 through 30 in the combo boxes that get the room’s length, width, and height. Display numbers from 30 through 40, in increments of 0.5, in the combo box that gets the roll coverage. When the interface appears, the numbers 10, 10, 8, and 37 should be selected in the Length, Width, Height, and Roll coverage combo boxes, respectively.
    The Calculate button’s Click event procedure should calculate and display the number of single rolls of wallpaper required to cover a room. Use a Sub procedure to make the calculation. The number of single rolls should be displayed as an integer. (If the number of single rolls contains a decimal place, it should be rounded to the next highest integer. For example, 8.2 rolls should be rounded up to 9.)
    The number of rolls should be cleared when a change is made to a combo box.
    Save the solution and then start and test the application. (If the roll coverage is 38.5 square feet and the room’s length, width, and height are 14, 20, and 8, respectively, the number of single rolls is 15.)

ความคิดเห็น • 1