CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - string类的方法
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
Button control
ComboBox
EditBox
TreeView
Static control
PropertySheet
RichEdit
ListView/ListBox
Menu control
ToolBar
StatusBar
Dialog_Window
Other
Tab Control
Search - string类的方法 - List
[
Other
]
StringBufferModify
DL : 0
StringBuffer类对象方法的使用。String和StringBuffer中对字符串的连接效果是不同的.-StringBuffer Object type of use. String and StringBuffer string to connect the results are different.
Date
: 2008-10-13
Size
: 2.26kb
User
:
易杜平
[
Other
]
java11111
DL : 0
问题描述:编写一个JAVA程序,用面向对象设计的方法编写一个电话卡的类。包括卡号、密码、余额、拨入号码等 b)基本要求:类的属性有卡号、密码、余额、拨入号码,电话卡的常用操作可以用连接电话方法、返回余额方法与通电话方法来实现。 c)方法功能描述: 构造方法(PhoneCard(卡号,密码,余额,拨入号码))可以完成属性值初始化赋值,并判断余额,余额为负就退出系统,请在构造方法中将初始时的连接置为false即表示没有连接。 卡号long cardNumber 密码private int password,余额double balance,拨入号码string connectNumber boolean connected(一个布尔类型变量表示电话卡连接状态,初始时默认没有连接,值为false,当调用连接电话方法()后,在判断卡号和密码相匹配后值置为true) 连接电话方法(performConnection(卡号,密码))可以完成检查卡号和密码,它是只有在卡号和密码相匹配时才连接 返回余额方法(getBalance())得到电话卡的余额 通电话方法(performDial())是模拟通过过程中,余额会不断减少,每调用此方法,电话卡的余额减少0。5元,打一次电话调用一次-Problem description : Prepare a Java program and object-oriented design methodology for the preparation of a calling card category. Including the card number, password, and the balance credited to the numbers b) Basic requirements : type attributes have card number, password, and the balance go to the numbers, Telephone cards can be used to operate the telephone link, to return to balance method and telephone methods to achieve. C) method functional description : Construction (PhoneCard (card number, passwords, balances, credited numbers)) to be completed initialization assigned attribute values, judgment and balance, a balance of negative on the withdrawal system, Please approach to the initial structure of the home for the false link that is not connected said. EVERGREEN long cardNumber
Date
: 2008-10-13
Size
: 1.32kb
User
:
张三
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.