| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 618 人关注过本帖
标题:遇到一道题用继承和多态的题不会了
只看楼主 加入收藏
嘟嘟好运气
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-9-17
结帖率:0
收藏
已结贴  问题点数:20 回复次数:5 
遇到一道题用继承和多态的题不会了

                    

You are to create a set of classes to implement a banking mode in Java, and are expected to employ the techniques of inheritance and polymorphism.

A bank has account owners, each of them may have one or more bank accounts, such as savings accounts, checking accounts, and business accounts. Each account has the following information stored as private data: such as name,  account_number, and balance.  At the end of each month, the bank issues a statement for each bank account containing the following information: name, SSN, account_number, phone_number, open balance, and close balance. The close balance is the open balance plus the interest calculated based on the type of the account. To simplify your task, you can assume that there was no transaction in the past month.

With a polymorphic method, the interest of each account is calculated differently:
1.    No interest for business accounts
2.    2.5% interest for each checking account
3.    4% for each saving account if the balance  < $5000
5% otherwise

You may need to create the following classes: accounts, business_accounts, checking_accounts, savings_accounts, and the driver class.

Read the following data from a file and use it  to test your program:

NAME         ACCOUNT          PHONE        SSN            BALANCE             TYPE

Sam        78192222        555-0498    123-45-6789         4500               B
Carla       74329832        555-9812    233-98-3831        230                C
Woody       72872911        555-9281    823-23-0911        5700               S
Diane       63672822        555-9232    212-11-0091        2300               S
Norm       27873773         555-2932    918-22-0911        1400               C
Cliff       38737737        555-9171    811-12-9811        6700               S
Tom        72932331         555-9283    235-09-9282       7800                C

Submit your program along with the output produced


搜索更多相关主题的帖子: techniques following accounts business expected 
2013-09-17 11:43
java小蚂蚁
Rank: 11Rank: 11Rank: 11Rank: 11
来 自:上海
等 级:贵宾
威 望:18
帖 子:558
专家分:2186
注 册:2013-7-2
收藏
得分:7 
我靠,这不为难我吗?题目翻译下

学海无涯#¥%……&*(
2013-09-17 11:54
java小蚂蚁
Rank: 11Rank: 11Rank: 11Rank: 11
来 自:上海
等 级:贵宾
威 望:18
帖 子:558
专家分:2186
注 册:2013-7-2
收藏
得分:0 
题目看了下,你是哪不会啊,这么含糊的问,不知道你想问什么

学海无涯#¥%……&*(
2013-09-17 11:58
zrqvery158
Rank: 2
等 级:论坛游民
帖 子:28
专家分:68
注 册:2013-8-23
收藏
得分:7 
我靠,看不懂英文。
2013-09-17 12:11
java小蚂蚁
Rank: 11Rank: 11Rank: 11Rank: 11
来 自:上海
等 级:贵宾
威 望:18
帖 子:558
专家分:2186
注 册:2013-7-2
收藏
得分:0 
问先楼主先,你看得懂题目意思吗?
题目让你创建一个银行的简易工作模式,可能会用多继承和多态,(这是废话)
让你读取最下面的数据,做过测试。
需求就是中间那段,这有什么不会做的,写一个类,把那些变量都加进去。处理下逻辑关系,注意类之间的继承和实现,就OK了。
莫名就这么扔一个题目上来等人给你做题啊?
这年头学生都这样了!!!

学海无涯#¥%……&*(
2013-09-18 09:41
喝水的鱼
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:50
专家分:113
注 册:2012-9-10
收藏
得分:7 
凌乱啊英文
2013-09-18 23:46
快速回复:遇到一道题用继承和多态的题不会了
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015235 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved