第一次Java测试及感触(2018.9.20)

 在本周周四进行了java测试,有一点感触,测试的题目是用Java实现一个ATM机的管理系统。之前老师提前给我们样卷,结果考试的时候换了题型,瞬间脑子空白,一时不知道怎么下手,因为暑假虽然涉猎了java,但是没有深入系统地进行学习,导致了对很多知识一知半解,遇到很多问题束手无策。经过三个钟头的挣扎,只完成了一小部分的代码,只有简单的set()get()函数,以及简单的输出界面,能够输出ATM的初始界面,能够输入银行卡号,数据库也只是建立了一个大概。

后来在课后又对代码进行了断断续续的修改,对从网上找来的数据库代码段进行了较大修改,然后简单的补了其他部分的程序。

通过这次测试,我明白了初学者离熟练编写代码还有一段很长的距离,基本数据类型、数组、程序控制语句等都得在练习中熟悉,在之后的几天内,得知有人已经编出了图形窗口界面(为了简便起见我并没有往这方面想),便突然有了斗志,成长路上有这样全心向前的战友相信对我的正面帮助会很大。

以后每天要抽出时间进行代码习题的练习,熟能生巧,同时也要多读相关书籍,争取能在期末考试得到自己想要的结果。

account类

package zuoye;

//信1705-3 20173526 赵剑峰

public class Account {

private String accountID;
private String accountname;
private String operadate;
private int operatetype;
private String accountpassword;
private int amount;
private int accountbalance;

public String getaccountID()
{
return accountID;
}
public void setaccountID(String accountID)
{
this.accountID=accountID;
}
public String getaccountname()
{
return accountname;
}
public void setaccountname(String accountname) {
this.accountname=accountname;
}
public String getoperadate()
{
return operadate;
}
public void setoperadate(String operadate)
{
this.operadate=operadate;
}
public String getaccountpassword()
{
return accountpassword;
}
public void setaccountpassword(String accountpassword)
{
this.accountpassword=accountpassword;
}
public int getoperatetype()
{
return operatetype;
}
public void setoperatetype(int operatetype)
{
this.operatetype=operatetype;
}
public int getamount()
{
return amount;
}
public void setamount(int amount)
{
this.amount=amount;
}
public int getaccountbalance()
{
return accountbalance;
}
public void setaccountbalance(int accountbalance)
{
this.accountbalance=accountbalance;
}

public Account(String accountID,String accountname,String accountpassword,String operadate,int operatetype,
int amount,int accountbalance)
{
this.accountID=accountID;
this.accountname=accountname;
this.accountpassword=accountpassword;
this.operadate=operadate;
this.amount=amount;
this.accountbalance=accountbalance;
this.operatetype=operatetype;
}

public Account(String string, String string2, String string3, int i) {
// TODO 自动生成的构造函数存根
}
//----------------<附加函数>-----------------//
//判断是否ID格式正确
public boolean RightId(){

return true;
}
//----------------<构造函数>-----------------//
public Account(){
amount = 0;
accountbalance = 0;
accountpassword = "hi!";
operatetype = 0;
operadate = "2017-09-10"
;
accountname = "hellow";
accountID = "20173526";
}
//----------------<主函数>-----------------//
public static void main(String[] args) {
System.out.println("本程序为基础设置程序!");
}
}

猜你喜欢

转载自www.cnblogs.com/yeshenfeng/p/9697381.html
今日推荐