# auther zjs
# data 2019/7/19 15:44
# file_name BAM
# 银行账户管理系统(BAM)
# 写一个账户类(Account):
# 属性: id:账户号码 长整数
# password:账户密码
# name:真实姓名
# person_id:身份证号码 字符串类型
# email:客户的电子邮箱
# balance:账户余额
# 方法:
# deposit: 存款方法,参数是浮点数型的金额
# withdraw:取款方法,参数是浮点数型的金额
# 添加新的银行的客户类:储蓄账户(Saving_Account)和信用账户(Credit_Account),区别在于储蓄账户不允许透支,而信用账户可以透支,并允许用户设置自己的透支额度.
import random
class Account:
''''''
def __init__(self, pwd, name, person_id, email, balance) -> None:
super().__init__()
self.__id = random.randint(1000000000000000, 9999999999999999)
self.pwd = pwd
self.__name = name
self.__person_id = person_id
self.email = email
self._balance = balance
@property
def id(self):
return self.__id
@property
def name(self):
return self.__name
@property
def person_id(self):
简单银行管理系统(Python)
于 2019-07-19 18:28:09 首次发布