Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework assignment #2 Create a Windows application that calculates the cost of operating electrical devices. The cost of electricity used by a device is calculated

image text in transcribed
Homework assignment #2 Create a Windows application that calculates the cost of operating electrical devices. The cost of electricity used by a device is calculated by the formula: Cost of electricity- wattage of device x hours used 1000 x cost per kWh (in cents) The application should allow the user to enter the name of the device, the wattage of the device, and the number of hours the device is used. Let's assume that the cost per kWh of electricity is 12 cents. Include a button labelled "Display Device Cost". When this button is clicked, the program displays device name, hours used and cost of electricity used by the device. This information is displayed in a listbox The user should be able to clear all entries and close the program using buttons. In case the user enters invalid values for the input needed to calculate cost, the program should display an error message. In addition, the program should keep summary information about all devices processed during a session. When the user clicks a button labeled Display Total Cost", display count of devices processed and total cost of electricity used by all devices. This information is displayed in the Homework assignment #2 Create a Windows application that calculates the cost of operating electrical devices. The cost of electricity used by a device is calculated by the formula: Cost of electricity- wattage of device x hours used 1000 x cost per kWh (in cents) The application should allow the user to enter the name of the device, the wattage of the device, and the number of hours the device is used. Let's assume that the cost per kWh of electricity is 12 cents. Include a button labelled "Display Device Cost". When this button is clicked, the program displays device name, hours used and cost of electricity used by the device. This information is displayed in a listbox The user should be able to clear all entries and close the program using buttons. In case the user enters invalid values for the input needed to calculate cost, the program should display an error message. In addition, the program should keep summary information about all devices processed during a session. When the user clicks a button labeled Display Total Cost", display count of devices processed and total cost of electricity used by all devices. This information is displayed in the

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

=+13.5. Show of real functions f and g that f(w) + g(w)

Answered: 1 week ago

Question

b. What groups were most represented? Why do you think this is so?

Answered: 1 week ago