Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Eskom in South Africa wants to keep track of its customers' electricity usage. Each customer has a unique ID , name, and address. The provider

Eskom in South Africa wants to keep track of its customers' electricity usage. Each customer has a unique ID, name, and address. The provider charges its customers based on the following tariff structure:
If the consumer uses 200 kWh or less, the tariff is R1.50 per kWh.
units *1.5
If the consumer uses more than 200 kWh but less than 500 kWh (201 kWh to 500 kWh), the tariff is R2.00 per kWh for every kWh over 200.
(200*1.5)+((units-200)*2)
For consumption exceeding 500 kWh, the tariff is R2.50 per kWh for every kWh over 500.
(200*1.5)+(300*2)+((units-500)*2.5)
Write a C# program that allows the user to:
Add a new customer.
Input electricity consumption for a customer.
Calculate the bill for a customer.
Exit the program.
Sample output:
Electricity Billing System
1. Add a new customer
2. Input electricity consumption for a customer
3. Calculate the bill for a customer
4. Exit
Enter your choice: 1
Enter customer ID: 101
Enter customer name: Eva
Enter customer address: 123 Berg St
Customer added successfully.
Electricity Billing System
1. Add a new customer
2. Input electricity consumption for a customer
3. Calculate the bill for a customer
4. Exit
Enter your choice: 2
Enter customer ID: 101
Enter electricity consumption for Eva (in kWh): 300
Electricity consumption recorded successfully.
Electricity Billing System
1. Add a new customer
2. Input electricity consumption for a customer
3. Calculate the bill for a customer
4. Exit
Enter your choice: 3
Enter customer ID: 101
Total Bill Amount for Eva: R550.00
Electricity Billing System
1. Add a new customer
2. Input electricity consumption for a customer
3. Calculate the bill for a customer
4. Exit
Enter your choice: 4
Exiting program

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_2

Step: 3

blur-text-image_3

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

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions