The Megawatt Solar Panel Company installs solar panels on home rooftops. The base installation charge of $2,000 includes two panels. The charge for each additional panel is $300. The normal waiting time for installation is two weeks, but customers can pay an express charge of 5% of the total cost to reduce this time. Create an application that collects the required information from the user and calculates the charges for the installation.
Write a Visual Basic code for the following below
CSC 130 Homework 2
The Megawatt Solar Panel Company installs solar panels on home rooftops. The base installation charge of $2,000 includes two panels. The charge for each additional panel is $300. The normal waiting time for installation is two weeks, but customers can pay an express charge of 5% of the total cost to reduce this time. Create an application that collects the required information from the user and calculates the charges for the installation.
The user enters a first name, the number of panels, the amount of the deposit, and if they want expedited installation.
Use separate procedures or functions for the following:
- An introduction to the program. Use the first name somewhere in this introduction.
- Validation of the number of panels
- Validation of the amount of the deposit
- Choose expedited installation
- Calculation of the total cost
- Calculation of the balance due
- Print the results
NOTE: if the deposit is less than the total due, indicate a balance due. If not, indicate a refund.
Error checking should include the following criteria:
- the name cannot be blank
- the number of panels must be an integer between 1 and 1,000 (include 1000 as a valid number)
- the deposit amount must be a numeric value greater than or equal to 0
Other requirements:
- Use variables or constants
- Include comments in a header and throughout the code
- Format amounts as currency
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images