Java Student Achievement Management System

Source: Internet
Author: User

Java Student Achievement Management System

/** @ ------ Create a mobile terminal homework ------ * @ copyright by lzy on 2016/4/12. * @ name: java student achievement management system. * @ function: Student-related information, input, query, statistics, and modification .... * @ PS: the student management system of the graphic interface is not required. */import java. util. imports; import java. lang. *; import java. io. *; class Student {private static Student [] s = new Student [100]; // maximum number of students allowed for entry int n = 0; private String name; private int num; private String classAge; private int chinese; private int math; private int english; // determines whether any input is required. Generate public void judge () throws IOException {int I; char ch; String str; expect In = new expect (System. in); if (n = 0) {System. out. println ("You have not entered any student information, whether to input (Y/N):"); str = In. next (); ch = str. charAt (0); while (ch! = 'Y' & ch! = 'Y' & ch! = 'N' & ch! = 'N') {System. out. println ("incorrect input. Please enter again:"); str = In. next (); ch = str. charAt (0);} if (ch = 'y' | ch = 'y') {this. add () ;}if (ch = 'n' | ch = 'n') {this. menu () ;}}// menu public void menu () throws IOException // throws an exception and calls this method to handle the exception. If the main method also throws an exception, it is handed over to the Java Virtual Machine for processing, the same below. {int a; vertex in = new partition (System. in); System. out. println ("*************** student information management System **************"); System. out. println ("***** 1. enter student information ****** "); System. out. println ("**** * 2. display student information ****** "); System. out. println ("***** 3. modify student information ****** "); System. out. println ("***** 4. delete student information ****** "); System. out. println ("***** 5. view student information ****** "); System. out. println ("***** 0. log out of the management System ****** "); System. out. println ("************************************* *****"); system. out. print ("select (0 ~ 5): "); a = in. nextInt (); while (a <0 | a> 5) {System. out. print ("the input is invalid. Please enter it again:"); a = in. nextInt ();} switch (a) {case 1: this. add (); break; case 2: this. show (); break; case 3: this. modif (); break; case 4: this. delete (); break; case 5: this. look (); break; case 0: System. out. println ("successfully exited the system !!! "); System. exit (0); break ;}// enter the student information public void add () throws IOException {String str, str1, str2; int I, num1, t = 1; char ch, delimiter; FileWriter fw = new FileWriter ("E: // student.txt", true); // enter the student information to the fw in the specified txt file. write ("input student information list \ r \ n student ID name class language score mathematical score English Score \ r \ n"); student In = new student (System. in); while (t = 1) {System. out. println ("Enter the student ID:"); num1 = In. nextInt (); // determines whether the student ID is repeated for (I = 0; I
 
  

Part:

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.