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

  What is the psuedocode

What is the psuedocode?

  Describe why analyst needs to understand how people think

Describe why an analyst requires to understand how people think, how they learn, how they react to change, how they communicate, and how they work.

  Write program mips assembly adds two integer and display sum

Write a MIPS assembly language program that adds two integers and displays the sum and the difference.

  What is percentage of time processor is blocked due to dma

Consider a device of 50MBPS is operated in cycle stealing mode of DMA as and when 8byte word is available. It is transferred into the memory in 40ns. What is the percentage of time processor is blocked due to DMA.

  Use mcnaughton''s wrap around rule

Use McNaughton's wrap around rule to construct a preemptive

  Oracle business intelligence system is used for

Oracle Business Intelligence system is used for, and what kinds of tasks you perform using the system?

  What is meant by artificial intelligence

What is meant by artificial intelligence? What are two essential differences between human brains and the central processing unit of a computer.

  When would a weak relationship be more suitable

When would a weak relationship be more suitable than a strong relationship? Give concrete examples?

  Describe at least 1 example use of each technology

Discuss the major differences between these types of networking technologies. Describe at least 1 example use of each technology that utilizes the strengths of that technology.

  Use any method to prove the following either true or false

any method to prove the following either true or false. you must show all work: YZ+XYZ'+X'Y'Z'=XY+X'Z

  Display the largest of a list of positive numbers

solve the problem by using raptor. Find and display the largest of a list of positive numbers entered by the users. The user should indicate that he/she has finished entering numbers by entering a 0.

  As a beginning business analyst

As a beginning business analyst, you have been tasked by the project manager to develop the system requirements related to the handling of outstanding purchase orders.

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