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 limitations should you keep in mind

When choosing recommended practices ( in accordance with information security) what limitations should you keep in mind?

  User defined company class

Create a user defined Company class the class will include Company Name, Stock Symbol and stock value per share. Include a parameterized constructor and get methods for each of the instance variables. Also include a toString method.

  Integer value from 1 to20 along with as squared value

Write an application that displays every integer value from 1 to20 along with as squared value

  Determine the date in opening the letter from same file

if /home/jenny/draft and /home/Alex/letter are relates to same file and the following sequence of events occurs, determine the date in opening the letter?

  What three functions are the most important

DBMS has many functions. What three functions are the most important and why are they most important?

  Humans have launched into space

Draw an ER diagram. Make sure each entity type has at least one key attribute. Document any assumptions you make. Avoid diagrams with a single entity. b. If you think the description is incomplete, list other data the database should store. c. Adjust..

  Construct a network diagram for the project

Construct a network diagram for the project. Calculate the scheduled completion time.

  Data governance improvements

Data Governance Improvements

  Role of cognitive psychology in the design of user interface

To enable students to select and justify the choice of appropriate input/output devices and communication styles for interactive systems - You are given the opportunity to evaluate a user interface prototype which was designed according to the bri..

  Job hunting plan of action

Use this plan of action as a living document to keep track of your job hunting efforts. The more honest you are in this document, the better you can prioritize your efforts.

  Write algorithm computing total flight time and distance

Write an algorithm for computing total flight time and the horizontal distance traveled by the cannon ball for the problem discussed in class?

  Differences and similarities between ieee 802-11 frame

What are the differences and similarities between an IEEE 802.11 frame and an Ethernet frame?

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