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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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