Question
**READ CAREFULLY FOLLOW ALL INSTRUCTIONS PLS** in visual studios Objectives In this lab you will practice creating a class and collecting multiple class objects. You
**READ CAREFULLY FOLLOW ALL INSTRUCTIONS PLS** in visual studios
Objectives
In this lab you will practice creating a class and collecting multiple class objects. You will also write unit tests for the class.
Problem Description
You were asked to create an application that processes electricity bills for multiple customers. For now, customers' data will be just stored in the application. In other words, each time the application executes, it will start from scratch.
For each customer, electricity bill is calculated based on number of kWh as follows:
- There is an administrative charge of $12.
- In addition, for each kWh used there a charge of $0.07.
For each customer, the following data is stored:
- AccountNo - an int value,
- FirstName and LastName - string values,
- Number of kWh used - a decimal number, and
- BillAmount - a decimal number.
Your application will create and store multiple objects that contain customers' data. It will also keep track of the following statistics:
- Number of customers processed,
- Total number of kWh used,
- Average bill amount
Technical Requirements
Your solution will contain three projects:
1. Class library CustomerData that contains class Customer that has the following members:
- public properties for the customer's data listed above,
- a constructor or constructors,
- method CalculateCharge that calculates the charge amount for this customer according to the rules, and
- ToString() method that returns a display string.
2. WindowsForms project that defines GUI with controls to enter new customer's data and to display data of all customers and required statistics. It should be well-organized and easy to use. When adding a new customer, user enters FirstName and LastName and kWh used. All entries must be provided, and kWh has to be a non-negative number. AccountNo can be either generated by the application or entered by the user. If it is entered by the user, the application should check for uniqueness. All customers' data is displayed in a list box, and there are controls to display the required statistics.
3. UnitTest project that contains tests for method CalculateCharge in class Customer At least 3 tests are present and all pass.
General requirements
Like in Lab 1, the look of the form is up to you, but professionalism and clarity easiness to use will be a factor in marking.
Required comments are the same as for Lab 1:
- Top block comments on each code file that explains purpose of the module or class, date when created (at least month and year), and the author's name.
- Each method has a comment that explains its purpose.
- Each variable has a comment that explains its meaning.
- Each group of statements that perform a single task has a comment that explains the task.
**READ CAREFULLY FOLLOW ALL INSTRUCTIONS PLS** in visual studios
Objectives
In this lab you will practice creating a class and collecting multiple class objects. You will also write unit tests for the class.
Problem Description
You were asked to create an application that processes electricity bills for multiple customers. For now, customers' data will be just stored in the application. In other words, each time the application executes, it will start from scratch.
For each customer, electricity bill is calculated based on number of kWh as follows:
- There is an administrative charge of $12.
- In addition, for each kWh used there a charge of $0.07.
For each customer, the following data is stored:
- AccountNo - an int value,
- FirstName and LastName - string values,
- Number of kWh used - a decimal number, and
- BillAmount - a decimal number.
Your application will create and store multiple objects that contain customers' data. It will also keep track of the following statistics:
- Number of customers processed,
- Total number of kWh used,
- Average bill amount
Technical Requirements
Your solution will contain three projects:
1. Class library CustomerData that contains class Customer that has the following members:
- public properties for the customer's data listed above,
- a constructor or constructors,
- method CalculateCharge that calculates the charge amount for this customer according to the rules, and
- ToString() method that returns a display string.
2. WindowsForms project that defines GUI with controls to enter new customer's data and to display data of all customers and required statistics. It should be well-organized and easy to use. When adding a new customer, user enters FirstName and LastName and kWh used. All entries must be provided, and kWh has to be a non-negative number. AccountNo can be either generated by the application or entered by the user. If it is entered by the user, the application should check for uniqueness. All customers' data is displayed in a list box, and there are controls to display the required statistics.
3. UnitTest project that contains tests for method CalculateCharge in class Customer At least 3 tests are present and all pass.
General requirements
Like in Lab 1, the look of the form is up to you, but professionalism and clarity easiness to use will be a factor in marking.
Required comments are the same as for Lab 1:
- Top block comments on each code file that explains purpose of the module or class, date when created (at least month and year), and the author's name.
- Each method has a comment that explains its purpose.
- Each variable has a comment that explains its meaning.
- Each group of statements that perform a single task has a comment that explains the task.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started