Making a program based on kilowatt-hours

Assignment Help Basic Computer Science
Reference no: EM13849869

Question: An electric company charges customers based on Kilowatt-Hours (Kwh) used. The rules to compute the charge are:

First 100 Kwh, 20 cents per Kwh
Each of the next 100 Kwh (up to 200 Kwh), 30 cents per Kwh
(the first 100 Kwh used is still charged at 20 cents each)
Each of the next 200 Kwh (up to 400 Kwh) 45 cents per Kwh
All KHwh over 400, 60 cents per KH

Create a C# Form with a textbox to enter Kwh used, a read-only textbox to display the electricity charges, and a button to compute the charges. The Kwh used could be a number with decimals.

Requirements:

1. Input validation: Use the KWH textbox validating event to enforce two validation rules:

a. The Kwh contains digits only. The validating procedure should use a Try/Catch block to throw an error message "Please enter digits only!" if the entered Kwh is not a valid number or blank.

b. The Kwh cannot exceed 2000. Test your program with (1) , (2) Kwh = 250

1250_program based on Kilowatt-Hours.jpg

Reference no: EM13849869

Questions Cloud

How can the information from an activity-based : How can the information from an activity-based costing system guide improvements in operations and in decisions about products and customers? 300-400 words long
What is the average order size : Liverpool is targeting a CSL of 95 percent and uses a periodic review policy under which it reorders consoles every eight weeks. What is the average order size?
Assume that coupon payments are semi-annual : Duke Power is about to issue a new 10 year bond with a coupon rate of 6.25%. The bond has been rated AA by Standard & Poor's. You observe that a similar bond, recently issued by a power company in Virginia is priced such that its yield-to-maturity is..
Role of stakeholders in this environment : Suppose you are working with the stakeholders of an organization that has a dynamic and complex environment. How might the role of stakeholders in this environment differ from a more stable environment
Making a program based on kilowatt-hours : Question: An electric company charges customers based on Kilowatt-Hours (Kwh) used. The rules to compute the charge are:
What is your estimate of the current stock price : Ernie Manufacturing has projected sales of $155 million next year. Costs are expected to be $100 million and net investment is expected to be $17.5 million. Each of these values is expected to grow at 14 percent the following year, with the growth ra..
Conduct research regarding the manner : Conduct research regarding the manner in which varying domestic and foreign governments govern supply chain and logistics issues.
Considering leasing new robotic milling control system : Your firm is considering leasing a new robotic milling control system. The lease lasts for 5 years. The lease calls for 6 payments of $300,000 per year with the first payment occurring at lease inception. What is the maximum lease payment that you wo..
The pay-for-performance system : What can an organization do to ensure that merit pay and other incentives are administered fairly? What kind of data would you gather to ensure that the pay-for-performance system is not biased in favor of any particular group? Would linking pay to o..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Research the key terms

Research the key terms

  Create an ou design diagram

Create an OU design diagram. Prepare a graphical representation of the group structure if groups are included in your quantified graphic presentation.

  Network connectivity and protocols

Network Connectivity and Protocols-

  Circumstances would you not want to create

Under what circumstances would you not want to create one physical table for every relation in your logical data model? Give a concrete example.

  Create a pseudocode

Create a pseudocode using if instruction containing a compound condition that will satisfy the following:

  Justify five reasons not consider smartphone to computer

justify at least five reasons why you would or would not consider a smartphone and other cell phones to be computer systems

  Data center and a new state of theart manufacturing facility

Data center and a new state-of-the-art manufacturing facility.

  How many different types of sundaes can be ordered

If a sundae is allowed to have three scoops of ice cream where each scoop must be a different flavor (order of scoops doesn't matter), and either a syrup or a topping (but not both) are required, how many different types of sundaes can be ordered?

  Sense the language of a

For this, sense the language of A is in the set of all languages, would showing this just involve making a DFA of one state that accepts everything? I am not sure how to show this.

  Is anyone familiar with oracle

Is anyone familiar with Oracle 11g, 2E, Joan "Casteel Chapter5 Procedures

  Design a circuit to add 1 to a given n-bit number

What is the decimal value of the following IEEE 754 single-precision floating-point number?

  What role would the pmt function and the vlookup function

what role would the pmt function and the vlookup function play in what-if analysis? include in your answer an

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd