Project Introduction
Project : In our classroom, there are generally 3-5 times the class attendance opportunities. In the past years, teachers are in the time sheet marking, this year is not the same, let us write a program, the attendance data saved to the computer.
Available data, student list file: list.txt (Download address: http://pan.baidu.com/s/1hqxECIw)
201011621305 Chen Guangsen
201111621301 Cao Paoin
201111621306 Chen Ka-ho
201111621313 Chen Junhong
201111621325 Dragon Fly Ling
Class Name: jk12
Requirements :
1 All input parameters are entered using the command line.
2 Java main class name is Registerapp
3 command line Input mode is java registerapp list.txt jk12
4 sign-in results saved to Jk12_20140303_1430.txt (class name _ date _), the contents are as follows, if the student to class, then Mark 1, otherwise marked as 0 201011621305 Chen Guangsen 1
201111621301 Cao Paoin 1
201111621306 Chen Ka ho 0
201111621313 Chen Junhong 0
201111621325 Long Fei Ling 1
Reference Solutions [Java] View Plain copy/** * program features: Simple sign-in procedure, able to save the results after signing * Author: Ding and special * Time:2014.03.02 * QQ:303727350 */ import java.io.file; import java.io.filenotfoundexception; import java.io.printwriter; import java.text.simpledateformat; import java.util.date; import java.util.scanner; public class registerapp { /** * @param args * @throws Exception */ public static void main (String[] args) throws Exception { // TODO Auto-generated method stub //(a) Use command line arguments, enter student list, and class name // use format: java registerapp list.txt wl121 if (args.length != 2) {         SYSTEM.OUT.PRINTLN ("parameter input is not correct"); system.out.println ("Use Method (sample):java registerapp List file name class name "); System.exit (0); } //(b) Student attendance results: Student to, enter 1 ; absent, input 0 system.out.println ("——————————————————"); system.out.println ("Easy student Sign in program V0.1"); system.out.println ("The teacher called the name, please answer '"); system.out.println ("1: to class 0: Absent from school"); system.out.println ("——————————————————"); // (c) Obtain system current date time Date now = new Date (); simpledateformat dateformat = new simpledatefoRmat ("yyyymmdd_hhmm");//can easily modify date format String Strdate = dateformat.format ( now ); system.out.println ("Current time:" +strdate); //(d) Read the student list, args[0] for the student list file,