Java Programming
Xiang Zhang
javaseu@163.com
Preparing the Environment
- Installing JDK 8+ (J2SE version 8 or above) into your computer: https://www.oracle.com/java/technologies/downloads/;
- Verifying if JDK has been succesfully installed by typing "java -version" in your comannd line like this. If you see "java version "1.x.xxxxx"", congradulations!
- Then installs Eclipse IDE for J2SE (https://www.eclipse.org)(the latest version is 2019-06, "Eclipse IDE for Java Developers", please DO NOT download the "Eclipse IDE for Enterprise Java Developers", that is for J2EE, which is another edition of Java) OR IntelliJ IDEA (https://www.jetbrains.com/idea/).
- Verifying if the IDE is correctly installed by running a HelloWorld program, taking Eclipse as the example: example
Java Style
Checkstyle is a Open Source development tool to help you ensure that your Java code adheres to a set of coding standards. Checkstyle does this by inspecting your Java source code and pointing out items that deviate from a defined set of coding rules.
Searchable Javadoc
CHM version of Javadoc for JDK8
Slides
Assignments
All the assignments must be submitted to javaseu@163.com
Soft Deadline: submit your code before the next weekend.
Hard Deadline: submit all your assignements before the examination week.
Please pay attention:
For Chinese class, the title of your email should be: 中文班 + 学号 + 姓名 + 章节,for example: "中文班 71120101 张祥 第五章作业"
For English class, the title of your email should be: 英文班 + 学号 + 姓名 + 章节,for example: "英文班 71120101 张祥 第五章作业"
Course Design
构造一个ATM机,允许存在多个账户,且向用户提供两层菜单:
第一层菜单为用户登录菜单,包括以下两个功能:
- create new user (创建新用户)
- login (用户登录)
- exit (退出ATM机)
用户登录后进入第二层菜单,包括以下五个功能:
- change password (修改密码)
- query (查询余额)
- withdraw (取钱)
- deposit (存钱)
- logout (用户登出,回到一级菜单)
课程设计要求:
- 一个用户的基本信息包括:用户名、密码、账户余额 等等;
- 用户的信息需要能够保存在文件中,下一次启动ATM机请将已保存的用户信息读取出来;
- * 每过10秒钟,ATM机为每位用户增加5%的利息(选做)(退出ATM机后不用再加利息);
- 除了代码以外,还需提交一份简短的课程设计报告(1-2页),阐述自己代码的架构(例如是否采用MVC架构)、利息的计算方法、设计中碰到的问题等等。在课程设计报告中,也鼓励大家写一些对本次课程的看法和建议,会有相应的加分;
- 最终将源码+电子版课程设计报告发送至 javaseu@163.com,邮件标题为:学号+姓名+“课程设计” ,切勿忘填学号和姓名
- 纸质版课程设计报告需要提交,请提交给课程助教薛兆东同学
- 课程设计报告封面:
- 截止时间:第16周周日晚24点