C#——windows程序设计作业1
来源:http://www.tudoupe.com时间:2022-04-03
题目
请在设计方案时利用一个委员会实现信用卡用户的时间还款功能。
这一专题的申请书指出,用户有信用卡,是信用卡。信用卡包含总金额;信用卡发票标明整个月消费量。用户有许多储蓄卡,所以他们的月消费总量低于信用卡使用总量。为了还款,可以使用储蓄卡;还款是指将信用卡的每月全部用完从信用卡中提取到信用卡;如果卡的余额不足,则不能还款。
标准如下:1必须使用委员会2事件触发程序作为月偿还到期日;
namespace card_work
{
class user
{
public int id;
public String name;
public int demoney;
public int balance;
public int date;
public int ddl = 26;
public user(int id, String name, int demoney, int balance, int date)
{
this.id = id;
this.name = name;
this.demoney = demoney;
this.balance = balance;
this.date = date;
}
public int getddl()
{ return this.ddl; }
public void repay()
{
int nowmoney;
不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,不,稳定;
nowmoney = this.balance - this.demoney;
if (nowmoney < 0)
"Console. writeLine." "Console. writeLine. 翻译: 翻译: 翻译: 翻译: 翻译:
else
现为金钱; 控制台。 writeLINE (“ 成功还款余额 ” ), 现为金钱 ;
}
}
class dele
{
public delegate void card();
public event card dMoney;
public void test()
{
if(dMoney != null)
{ dMoney(); }
}
}
class program
{
static void Main(string[] args)
{
dele DD = new dele();
u1 = 新用户(25855, "1号",550,100,26等);
if(u1.date==u1.getddl())
{ DD.dMoney += new dele.card(u1.repay);}
else
"Console. writeLine." "Console. writeLine. 翻译: 翻译: 翻译: 翻译: 翻译:
DD.test();
}
}
}

网站地址:https://gitee.
相关新闻
- 2022-08-04 WPF的由来
- 2022-08-04 Win11勒索软件防护怎么打开?Win11安
- 2022-08-04 Windows系统jdk的配置
- 2022-08-04 Windows10 OneNote怎么重新登录?如何重
- 2022-08-04 超好用的 Windows 效率工具推荐
- 2022-08-04 Windows如何在CMD或PowerShell中配置代理
- 2022-08-04 powershell和cmd对比
- 2022-08-04 【QT】Windows下QT下载安装
- 2022-08-04 windows下 C++ 实现类属性的get和set方
- 2022-08-04 Win11快速助手在哪里?Win11打开快速
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
