VB 求助!懂VB form application 进!帮忙

求助啊。要写个VB程序 来算电费水费煤气费

应该怎么设计好啊?要用OO来设计的。程序不会写啊。。。:cn03:

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.

  1. Create a new customer using a form interface.
    a. Each customer has their name, address (one line only required) and the accounts they hold

  2. 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

  1. 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

  2. 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.

这个三言两语说不清楚啊。。先把database设计好,大概有Customer, Account, Utility, Bill. 做好database后,再按照要求设计每一个form

不需要DATABASE的。 只是很普通的计算而已。然后存储到TEXT FORMAT.

这个怎么会不用DB?

看样是需要DB的,因为需要即时的输入新用户信息,如果没有DB,那么关闭程序时,这些信息就会由于不是全局变量(事先写好的)被删除。可以用access做个简单的database试试。

不用database的话就更简单了,先写个class定义好每个entity:Customer, Account, Utility, Bill。然后再按照要求一步一步做,找找近期的练习,应该会有类似的。

等全部写完后测试好,再把text文档读取和保存的地方加进去就好了。

你能帮下我吗?我在用vb 2008 express edition 写?
谢谢! 求求你!

我也很想帮你写个大概,但是实在是腾不出时间啊。。你把最近学校给的练习找出来,应该有很多地方是类似的。。把大概结构搞懂了再结合例子,很容易的。。

我看了好多练习,老师都是写一半不写一半。。。。。所以资料很乱。

可有偿帮助

HOW MUCH?:cn03:

到底是vb还是vb.net阿?

如果只是小程序,可以不用db,最简单就是serialize成xml存盘就好了。

vb form application , 我用visual basic express edition 2008

回复 little_fatfat
那应该是.net 吧。应该没有纯vb了吧?要么vba.
vb 2008应该就是单语言版的vs2008吧?