In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use java to achieve a simple student performance management system. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The details are as follows
/ * @ copyright by LzyRapx on 2016-4-12. * @ name:java Student Achievement Management system. * @ function: student-related information, input, query, statistics, modification, etc. * @ PS: the student management system with graphical interface is not required. * / import java.util.Scanner;import java.lang.*;import java.io.*;class Student {private static Student [] s=new Student [100]; / / the maximum number of students entered is int 0; private String name; private int num; private String classAge; private int chinese; private int math; private int english; / / determines whether student information is entered public void judge () throws IOException {int i; char ch String str; Scanner In=new Scanner (System.in); if (no student 0) {System.out.println ("you haven't entered any student information, do you want to enter (YCompN):"); str=In.next (); ch=str.charAt (0) While {System.out.println ("incorrect input, please re-enter:"); 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 the exception and calls this method to handle the exception. If the main method also throws the exception, it will be handled by the Java virtual machine, as shown below. {int a; Scanner in=new Scanner (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. Exit the management system * "); System.out.println (" * * "); System.out.print (" Please select (0,5): "); a=in.nextInt () While (a5) {System.out.print ("invalid input, please re-enter:"); 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 ("exit the system successfully!") ; System.exit (0); break;}} / / enter student information public void add () throws IOException {String str,str1,str2; int iMagnum 1; char ch,ch2; FileWriter fw=new FileWriter ("E://student.txt", true) / / input student information into the designated txt file fw.write ("list of student information entered\ r\ n\ r\ n\ nStudent ID name, class Chinese, math, English\ r\ n"); Scanner In=new Scanner (System.in) While (tweak ID 1) {System.out.println ("Please enter the student ID:"); num1=In.nextInt (); / / determine whether the student ID repeats for (item0).
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.