求助啊。要写个VB程序 来算电费水费煤气费
应该怎么设计好啊?要用OO来设计的。程序不会写啊。。。
Each customer of Sarre Utilities will have up to three accounts with the company – one for each of the utilities. A customer who has two accounts will have a 5% discount, while a customer who has three accounts will have a 10% discount applied to ALL bills. There are also shareholder customers, whose discount is an additional 5% for all accounts.
You are required to write a computer program that records the customers and their accounts with the company and to produce bills for each customer to a text file.
The functionality required is as follows.
-
Create a new customer using a form interface.
a. Each customer has their name, address (one line only required) and the accounts they hold -
Each account will be either an electric, gas or water account and will store the most recent two readings and will calculate the current bill based on the following table of prices
Utility Price per Unit Unit
Electric £0.15 kWh
Gas £0.08 KWh
Water £1.05 1000 litres
These values are for before any discount
-
For a given month go through every account in the system and ask for the current reading, making sure it is obvious to the user which account and customer the interface should input information for
-
Produce a bill for each customer for all their accounts giving an individual total for each account and a grand total for each customer. These bills to be written to a text file in a simple, but readable format.