文件名称:java11111
介绍说明--下载内容来自于网络,使用问题请自行百度
问题描述:编写一个JAVA程序,用面向对象设计的方法编写一个电话卡的类。包括卡号、密码、余额、拨入号码等
b)基本要求:类的属性有卡号、密码、余额、拨入号码,电话卡的常用操作可以用连接电话方法、返回余额方法与通电话方法来实现。
c)方法功能描述:
构造方法(PhoneCard(卡号,密码,余额,拨入号码))可以完成属性值初始化赋值,并判断余额,余额为负就退出系统,请在构造方法中将初始时的连接置为false即表示没有连接。
卡号long cardNumber 密码private int password,余额double balance,拨入号码string connectNumber
boolean connected(一个布尔类型变量表示电话卡连接状态,初始时默认没有连接,值为false,当调用连接电话方法()后,在判断卡号和密码相匹配后值置为true)
连接电话方法(performConnection(卡号,密码))可以完成检查卡号和密码,它是只有在卡号和密码相匹配时才连接
返回余额方法(getBalance())得到电话卡的余额
通电话方法(performDial())是模拟通过过程中,余额会不断减少,每调用此方法,电话卡的余额减少0。5元,打一次电话调用一次-Problem descr iption : 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 descr iption : 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
b)基本要求:类的属性有卡号、密码、余额、拨入号码,电话卡的常用操作可以用连接电话方法、返回余额方法与通电话方法来实现。
c)方法功能描述:
构造方法(PhoneCard(卡号,密码,余额,拨入号码))可以完成属性值初始化赋值,并判断余额,余额为负就退出系统,请在构造方法中将初始时的连接置为false即表示没有连接。
卡号long cardNumber 密码private int password,余额double balance,拨入号码string connectNumber
boolean connected(一个布尔类型变量表示电话卡连接状态,初始时默认没有连接,值为false,当调用连接电话方法()后,在判断卡号和密码相匹配后值置为true)
连接电话方法(performConnection(卡号,密码))可以完成检查卡号和密码,它是只有在卡号和密码相匹配时才连接
返回余额方法(getBalance())得到电话卡的余额
通电话方法(performDial())是模拟通过过程中,余额会不断减少,每调用此方法,电话卡的余额减少0。5元,打一次电话调用一次-Problem descr iption : 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 descr iption : 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
(系统自动生成,下载前可以参看下载内容)
下载文件列表
java.txt
www.dssz.com.txt
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.