使用Java写一个名为Account的类模拟账户该类的属性和方法如下所示:属性:账户id余额balance年利率rate方法:各属性的getset方法取款方法withdraw存款方法deposit编写一个Customer类包含属性 姓名name 账户account并提供对应属性的getset方法写一个测试程序1创建一个Customer名字叫Jane Smith他有一个账号为1000余额为2000年
成功取出:2000 Customer [name=Jane Smith, account=Account [id=1000, balance=1140.0, rate=1.23%]]
原文地址: https://www.cveoy.top/t/topic/eJaT 著作权归作者所有。请勿转载和采集!