I. Introduction of the Project
The system mainly establishes a library login system based on the basic mode, which is similar to the binary tree, which can be used to realize the two user types of the system:
① User Login
The user login contains the login information of the administrator and the reader, and the information content of the administrator and reader is the information in the calling user class.
② Readers (reader) login
The reader is logged in with the login information of the teacher and student, and the information in the reader class is invoked when logged in.
Second, the basic flowchart
three, module function introduction1) Introduction of user module function
public class User {
String name;
int PassWord;
Public User (String userName) {
THIS.name = UserName;
}
}
2)Introduction to the functions of the Administrator module
Based on the name entered, password to determine whether the reader is a reader or an administrator, and if the administrator invokes the relevant information in the User class and outputs " Hello, respectable administrator".
public class Manager extends user{
Public Manager (String userName) {
Super (UserName);
}
Public String toString () {
Return "Hello, respectable Administrator:" + this.name+ "Hello";
}
3)Introduction to reader module functions
1. Teacher
According to the name entered, password to determine if the reader is the teacher, and if the student calls the relevant information in the reader class and outputs " Hello, dear teacher user :".
public class Teacher extends Reader {
Public Teacher (String userName) {
Super (UserName);
}
Public String toString () {
Return "Hello, dear Teacher User:" + this.name+ "Hello";
}
}
Run:
1. Students
Based on the name entered, password to determine if the reader is a student, and if the student invokes the relevant information in the reader class and outputs " Hello, dear student user :".
public class Student extends Reader {
Public Student (String userName) {
Super (UserName);
}
Public String toString () {
Return "Hello, dear Student User:" + this.name+ "Hello";
}
}
Run:
Iv. introduction of main functions 1. Main function
Enter what you want to do after select features, create an object to get console information, and get an integer from the console to identify the features that the user has selected. If you select 0, click Enter to enter the discriminant user, if 1 or 2 output " Sorry, this feature has not been developed" if 3 exit the system and output " you have successfully exited. "
public static void Main (string[] args) {
Init ();
menu ();
SYSTEM.OUT.PRINTLN ("Please select function");
Scanner input = new Scanner (system.in);
int select = Input.nextint ();
Switch (SELECT) {
Case 0:userdenglu ();
Case 1:system.out.println ("Sorry, this feature has not been developed");
Case 2:system.out.println ("Sorry, this feature has not been developed");
Case 3:system.exit (0);
SYSTEM.OUT.PRINTLN ("You have successfully exited");
}
}
2. User identification
Prompt the user to enter the user name and password, the user name is assigned to name, the password is assigned to password, determine the name, password The user login is successful , save the corresponding record to str variables , the division of the record multiplier group, determine the identity , create the corresponding subclass assigned to their parent class , the use of polymorphic dynamics.
public static void Userdenglu () {
Scanner input = new Scanner (system.in);
System.out.print ("Please enter user name:");
String Name=input.next ();
System.out.print ("Please enter password");
String Password=input.next ();
if (Login (name, password)) {
User s = null;
String Str=list.get (count);
if (Str.split ("") [2].equals ("S")) {
S=new Student (name);
}else if (Str.split ("") [2].equals ("T")) {
S=new Teacher (name);
}else{
S=new Manager (name);}
System.out.println (s);
} else {
SYSTEM.OUT.PRINTLN ("Login Failed");
Userdenglu (); } }}
Five, summary and experience
Through this experiment I gained knowledge and felt the strength of the team. Two of people work together, in the development process, will always make some comments or suggestions. Two of people to explore together, think of aspects are more comprehensive, more detailed. Speed up the development of projects. Although there are many deficiencies in this management system, it is necessary for the management system to have the advantages of comprehensive functions, easy updating of the program, easy database management, friendly interface, convenient operation, high efficiency and good security. Believe that this library management information system is a set of school libraries in the daily management of the necessary management software, through the development of this system, I mastered the project development process, and further proficient in the basic knowledge of the professional, consolidating my grasp of java.
Book Management system specific code address: Https://github.com/fanqingxia/test
The experimental report on the book Management system of the pair project