Java Applet Research and Application——Comprehensive Evaluation System

Summary

During college, comprehensive evaluation and calculation is an indispensable job every semester. Manual calculation of comprehensive evaluation is a very complicated process: each student first calculates his own comprehensive evaluation score, makes a draft form, and submits it to the class committee; then the class committee checks and enters the results into an electronic file and submits it to the department Related departments. In this process, students often feel bored, so the accuracy rate of the draft form is very low; then manual checking and entry of grades result in heavy workload, low efficiency, and accuracy rate cannot be guaranteed. Therefore, the majority of teachers and students are eager to produce an information-based comprehensive evaluation system. Using this system, students can conveniently and accurately calculate their own comprehensive assessment scores, and upload the results to the server, saving the cumbersome work of manual checking by the class committee and score entry. Moreover, the query function provided by the system can facilitate students to retrieve the information they need. This paper mainly introduces the most popular Java Applet technology on the Internet, the analysis and design of the system, the realization of each function module, the test and debugging of the system, and the problems encountered in the system development process and the solutions to the problems.
Keywords: comprehensive evaluation; calculation; query; Applet

Abstract

During the university, computation the synthetical evaluation is necessary per term. The manual computation of synthetical evaluation is a much numerous and diverse process. First, everyone compute the scores by themselves, and make a draft, then deliver it. Second, the cadres in the class check the result and import the data into computer for making the document, then hand in it to a relative department or academy. In the process, the students are sick of it. Therefore, the veracity of the draft is low. On the other hand, manual checking and scores’ inputting cause the greater workload and lower efficiency. Moreover the veracity is unable to be guaranteed. So, all the teachers and students are looking forward to have an informationizational system of the synthetical evaluation. Using the system, students can’t only compute their scores of synthetical evaluation conveniently and correctly, but also can submit the results to the server. Which can omit the complicated work of class cadres’ manual checking and scores’ inputting. Moreover, the function of query offered by the systems can make convenient for students to search the information they want.The discourse introduces the Applet technology, the analysis and design of the system, the implement of every function module, the test and debug of the system, and the problems met in the exploitation as well as the solution to them.
Key words: synthetical evaluation; computation; query; Applet

Table of contents

Abstract I
Abstract I
1 Introduction 1
2 Introduction to Comprehensive Evaluation System Development Tools 1
2.1 ACCESS Database 1
2.2 Introduction to Java and Java Applet 2
3 Analysis and Design of Comprehensive Evaluation System 3
3.1 Requirement Analysis 3
3.2 Overall Framework of the System 4
3.3 Module Function Description 6
4 Comprehensive Evaluation System Realization 7
4.1 System Database Design 7
4.2 Realization of Database Access Module 9
4.3 Realization of Client Modules 9
4.4 Problems Encountered in the Development Process and Solutions 17
5 System Operation and Debugging 19
5.1 Test Purpose 19
5.2 Test Environment 19
5.3 Test Method and Test Process 19
5.4 Running and Debugging Results 20

Conclusion 21
Acknowledgments 21
References 22
Appendix 23

1 Introduction
During college, the students calculated the comprehensive evaluation many times, and deeply realized that the comprehensive evaluation calculation is a cumbersome and low-accuracy matter. At the same time, the class committee must check the written comprehensive evaluation scores submitted by the students every semester and input them into the computer to make an electronic document, which is convenient for the grade ranking of the students throughout the year, and the electronic document must also be uploaded to the computer. Submit it to the relevant department of the department for archival purposes. Every time this task is to be completed, the class committees of the whole class must participate. In the information age, this mode of manual calculation and comprehensive assessment will be replaced by computer-based information systems. Therefore, it has become everyone's urgent wish to design a comprehensive evaluation system with complete functions. Through this system, each student can accurately calculate their own comprehensive evaluation scores and upload the scores to the computer of the class committee. Rates are also guaranteed.
The development of this comprehensive evaluation system uses Java Applet technology, because Java Applet has unique advantages compared with ASP and other tools for making dynamic web pages: ASP and others are just scripting languages, while Java is an object-oriented language, which provides The rich class library can meet more interactive needs of users; Java is a platform-independent language, and the developed system has good portability and high security; scripting languages ​​such as ASP run on the server side , and Java Applet is a small application program running on the client browser. This feature enables Applet to have the advantages of both C/S and B/S software architectures.
At the same time, the development of this system adopts the object-oriented method. When dividing the system into modules, try to achieve high cohesion and low coupling, improve the independence of modules [1], and bring convenience to the addition and modification of module functions. The foreground is developed by the Java language with good portability, robustness and high security, and the background uses Microsoft's ACCESS database as a development platform. Powerful development tools and a stable background database ensure the robustness of the system. During the development of the system, I also encountered some problems (such as: the table display of data, etc.), but through my own efforts and the help of the instructor, these problems have been satisfactorily resolved.

2 Brief introduction of comprehensive evaluation system development tools
2.1 ACCESS database
Microsoft Access is a relational database management system based on Windows graphical user interface. Access became one of the Office 95 suite products in 1995. Access, one of the Microsoft office suite products, has sold nearly 7 million copies and has become the most popular desktop database system in the world. Access, like many good relational databases, can easily connect related information and complement other database systems. It can manipulate data from other sources, including many popular PC database programs (such as dBASE, Paradox, Microsoft FoxPro) and many SQL databases on servers, minicomputers and mainframes. Access also fully supports Microsoft's OLE technology [2].
Access also provides an advanced application development system for the Windows operating system. Compared with other database software, Access has the advantages of quick learning and easy operation. At the same time, using the built-in UBA language, we can not only develop commonly used data processing tools, but also design a complete set of database management information system with comprehensive functions [3]. Access also provides a powerful management model based on graphical user interfaces and wizards. The structure of Access can adapt to the needs of modular growth, automatic configuration, and maintenance of relatively small-scale server program development.
2.2 Introduction to Java and Java Applet
Java can be traced back to April 1991. Sun's Green Project (Green Project) began to develop consumer electronics (Consumer Electronics). The languages ​​used are C, C++, and Oak ( As the predecessor of the Java language), the development of consumer electronics products could not achieve the original expected goals due to the problems of the language itself and the market. Coupled with the rise of the Internet, the green plan also changed the direction of development, which eventually led to the development of Java. The generation of [4]. Java is a simple, object-oriented, robust, safe, interpreted, platform-independent, multithreaded, and dynamic language.
Java Applets are some small application programs written in the Java language. These programs are directly embedded in the page, interpreted and executed by a Java-supporting browser (IE or Nescape), and can produce special effects. It can greatly improve the interactive ability and dynamic execution ability of Web pages. A web page containing an Applet is called a Java-powered page, and it can be called a Java-supported web page [5].
When a user visits such a web page, the Applet is downloaded to the user's computer for execution, but only if the user uses a web browser that supports Java. Because the Applet is executed on the user's computer, its execution speed is not limited by the network bandwidth or Modem access speed, and the user can better appreciate the multimedia effects produced by the Applet on the web page.
The realization of Applet applet mainly relies on the Applet class in the java.applet package. Different from general applications, Applet applications must be embedded in HTML pages to be interpreted and executed; meanwhile, Applets can obtain parameters from Web pages and interact with Web pages.
The HTML file code of the web page containing the Applet must have such a pair of tags, and when the Java-supporting web browser encounters these tags, it will download the corresponding applet code and execute the Applet applet on the local computer .
Applet applets can also be run through the appletviewer of the Java development tool. An Applet program cannot do without the HTML file that uses it. The information about Applet in this HTML file should contain at least the following three points: 1) bytecode file name (compiled java file, suffixed with .class); 2) address of bytecode file; 3) on the web page The way to display the Applet.
Since web pages written in HTML (Hypertext Markup Language) are static and do not have the ability to interact with users, Java Applet is widely used to add dynamic and interactive components on web pages [6].
Because the Applet is downloaded from a remote server and executed locally, security is particularly important. By restricting the Applet to run in the sandbox (the running environment of the Applet), it is guaranteed that the Applet is safe for the local system. When the Applet is running in the sandbox:
1) It cannot run any local executable program;
2) Except for the server where the downloaded Applet is stored, the Applet cannot communicate with other hosts;
3) It cannot read and write to the local file system. (Trusted Applets relax this restriction);
4) In addition to the Java version number, operating system name and version number, file name separator ('/' or '\') and path used by the local machine, the Applet cannot obtain information about the local machine. other information about the machine. Applet also cannot obtain the user's name and E-mail address [7].

3 Analysis and Design of Comprehensive Evaluation System
3.1 Requirements Analysis
According to the comprehensive evaluation and scoring rules of the Department of Computer Science and Engineering and the experience of the majority of students in computing comprehensive evaluation, the functional requirements of the system are as follows: 1.
Users only need to choose according to the listed scoring items, And a small amount of data input can calculate your own comprehensive evaluation results.
2. Users upload their calculated and checked comprehensive assessment scores. In order to prevent malicious users from arbitrarily modifying legitimate users' scores, the user's legitimacy must be verified before uploading scores. Only legitimate users can upload their comprehensive assessment scores to The database on the server side. At the same time, legitimate users can also modify their own passwords at any time.
3. Users can query according to their own needs:
1) Enter the student number to get the student's comprehensive evaluation score, ranking, etc.
2) Query the comprehensive evaluation scores of all students, and arrange them in order of student number Display
3) Query the comprehensive evaluation scores of all students whose business learning results are greater than or equal to or less than a certain value, and display them in order of business learning results from high to low 4) Query
all students whose comprehensive evaluation scores are greater than or equal to or less than a certain value 5) Query the comprehensive evaluation scores
of all students whose professional academic performance is greater than or less than a certain value and whose comprehensive evaluation score is greater than or equal to or less than a certain value, and Displayed in order of student number.
4. Users can view the business learning results of the whole class and the proportion of each score segment of the comprehensive evaluation results, so as to better understand the comprehensive evaluation situation of the class.
3.2 The overall framework of the system
According to the functional requirements of the system, the framework of the system is analyzed as follows:

Figure 1 Overall framework of the comprehensive evaluation system

Fig. 2 Framework diagram of comprehensive evaluation calculation

Figure 3 Comprehensive evaluation query frame diagram

3.3 Module function description
1. Political quality
This module can list all the scoring items of political quality for users to choose their own score, and then calculate the score of political quality. The legal concept, learning attitude, moral cultivation, labor practice, reward and punishment score and political quality module have similar functions, and they all calculate their own scores, so I will not elaborate here.
2. Political and ideological quality
This module combines political quality, law and discipline concepts, learning attitude, moral cultivation, labor practice, rewards and punishments into various modules, and displays them to users in an overall way, and can add up the scores of each small module. Get the actual score of political and ideological quality (100-point system) and total score (actual score × 20%)
3. Business learning score
This module can process the scores of various courses input by users, and calculate the actual score of business learning (100-point system , the actual score of business learning = the sum of the credits of each course ÷ the sum of the credits of each course + the grade of public elective courses) and the total score (the actual score of business learning × 60%).
4. Intelligence quality score
In this module, the scores of each small module of scientific research ability, social work ability, normal student skills, and cultural activity ability are added to obtain the actual score of intelligence quality (100-point system) and the total score (actual score × 10% ).
5. Sports Quality Score
This module can handle the input of users' physical education grades, and calculate the actual physical fitness score (physical education grade x 60% + extracurricular sports activity score) and total score (actual score x 10%).
6. Accurate query
This module can accept the user to input the student number, and query the relevant situation of the student's comprehensive evaluation.
7. Fuzzy query
This module can accept the user's input, and according to the user's needs, query based on the business learning score and the comprehensive evaluation score.
8. The proportion of comprehensive evaluation results is displayed
This module can count the total number of people and the number of people in a certain score segment based on all uploaded comprehensive evaluations, and then display them to the user in a proportional diagram.
9. Upload of comprehensive evaluation results
This module can verify the legitimacy of users and upload the comprehensive evaluation scores calculated by legitimate users to the database on the server side, which will be used as archive materials and basis for grade verification.
10. User password modification
This module can verify the legitimacy of the user and enable legitimate users to modify their own passwords.

4 Realization of comprehensive evaluation system
4.1 System database design
1. Database requirements analysis:
The overall requirements for the design of the system database are: student number, user password, course name, course credits, achievement type, political and ideological quality, business learning, intelligence quality, physical education Quality, comprehensive evaluation score, remarks.
2. The system uses ACCESS as the database. In this system, the name of the database is required: comprehensive evaluation database.mdf, and the data tables needed for system design are established in it. The design of each table is as follows: Table 1 User information
table

Field Name Data Type Field Size Allows Empty
Student ID Text 15 No
Name Text 15 No
Password Text 20 No

Among them: the student number is the primary key

Table 2 Comprehensive evaluation score table

Field Name Data Type Field Size Allow Null Number of Decimal
Places Student Number Text 50 No
Political Ideology Quality Number Single Precision Allow 2
Business Study Number Single Precision Allow 2
Intelligence Quality Number Single Precision Allow 2
Sports Quality Number Single Precision Allow 2
Comprehensive Evaluation Score Numeric Single Precision Allowed 2
Remarks Remarks Allowed

Among them: the student number is the primary key

Table 3 Course information table:

Field Name Data Type Field Size Allow Null
Course Name Text 20 No
Credits Text 10 No
Grade Type Text 10 No

Where: the course name is the primary key

Table 4: Business Learning Score Sheet:

Field Name Data Type Field Size Allow Null Student
Number Text 20 No
Remarks Remarks Yes

Note: The student number is the primary key. Except for the two fixed fields of student number and remarks, the other fields in this table are dynamically generated during the running of the program.

4.2 Realization of the database access module
The connection between the project and the database adopts the JDBC-ODBC bridge connection [8], and a prompt will appear after the connection is successful, as shown in Figure 4:

Figure 4 The prompt diagram of successful database connection
The core code is as follows:
boolean success=true; //Define a flag variable to indicate whether the connection to the database is successful
try
{ Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”); //Load the driver con=DriverManager.getConnection(“jdbc:odbc:zonghecepingshujuku”); //Connection with database stmt=con.createStatement(); //Execute SQL statement to access database } catch(Exception e) { JOptionPane.showMessageDialog(this, "Database connection failed!"); success=false; } if(success) { JOptionPane.showMessageDialog(this,"Database connection succeeded"); }










4.3 Implementation of each module of the client terminal
1. Implementation of the political and ideological quality module:
the interface of this module is mainly developed by using the Java awt package and the swing package. The interface realization
is shown in Figure 5:

Figure 5. Political and ideological quality calculation interface
This module is composed of seven small modules including political quality, legal concept, learning attitude, moral cultivation, labor practice, reward and punishment scores, and other scores. The container panels of each small module are inherited from The Jpanel of the swing package, and each element in it, such as: check box, text box, etc., is managed by GridLayout. Each small module is designed as a class, which includes a constructor, getscore() method and getbeizhu() method to obtain the score of this small module and the reason for the score respectively. Select one of the political quality modules to describe its implementation process (other modules are similar) as follows:
class Zhengzhisuzhi extends Zuhemianban //Political quality class, see source code for details
{ ... //Class internal member declaration
public Zhengzhisuzhi(){ ... } / / Constructor function to realize the layout of the interface
public float getscore() //Get the political quality score
{ beizhu=""; //Use to store the score reason
float score=18; //Basic score 18 points
if(this.malie.getState ()) //If "Marxism-Leninism Theory Learning Excellence" is selected
{ score+=1; //Add the score of this item
beizhu+=this.malie.getLabel()+";"; //The reason for the score is added to the note string
}
... //Other scoring items are handled similarly
return score; //Return the score value
}
public String getbeizhu() //Get the content of the note
{ return beizhu; }
}
2. Business learning achievement calculation module
The interface of business learning achievement is shown in Figure 6:

Figure 6. The interface diagram of the calculation of business learning results.
One of the subjects is a small module, and the information of these subjects is obtained from the "course information table" on the server side. The combination of these subjects is enough to become the main part of the calculation of business learning results. However, since these subjects are dynamically generated rather than given at design time, an array linked list must be used to store these dynamically generated subject class instances, so that it is possible to obtain the necessary data in the process of calculating business learning scores. Also because it is dynamically generated, the implementation process is relatively complicated. The core code is as follows:
public Yewuxuexi (InetAddress ip) //The constructor passes in the IP address of the server
{ ... //Establish the data input and output stream for communication with the server , and submit initialization request
xinxis=datain.readUTF().split(“:”); //Read initialization data
for(int i=1;i<xinxis.length;i++)
{ String[] kechengxinxi=xinxis[i ].split(“,”);
Xuexichengji xuexichengji=new Xuexichengji(kechengxinxi[0],
Float.parseFloat(kechengxinxi[1].trim()),kechengxinxi[2]);
//Instantiate a subject and set Add it to the panel
this.add(xuexichengji);
//Add it to the array linked list to provide data for the credit scores of the following calculation courses
this.arraylist.add(xuexichengji); } //for
} //Yewuxuexi
public float getscore() //Get the sum of the credits of each course
{ float sum=0; //Initialize the score to 0
for(int i=0;i<this.arraylist.size();i++)
{ //traverse Each element in the linked list, and accumulate the score
sum=sum+((Xuexichengji)(arraylist.get(i))).getscore();
}
return sum; //Return the score as the return value of this method
}
3. Intelligent quality module
The module implementation interface of intelligent quality is shown in Figure 7:

Figure 7. Interface Diagram of Intelligent Quality Calculation
This module is composed of 5 small modules: scientific research ability, social work ability, normal student skills, literary and artistic activity ability, and other scores. Its realization process is similar to that of political and ideological quality, which is not mentioned here Let me repeat.

4. Sports quality module
The realization interface of the sports quality module is shown in Figure 8:

Figure 8. Interface Diagram of Calculation of Sports
Quality
5. Score upload module
The implementation interface of the score upload module is shown in Figure 9:

Figure 9 Score upload interface diagram
This module class inherits from the Frame class in the java.awt package. When the student number and password entered by the user are correct, the score can be uploaded. The core code of its implementation is as follows: //Insert the comprehensive evaluation
score The SQL statement of the database
strshangchuan=strshangchuan + "insert into comprehensive evaluation results table values('"
+this.xuehao.getText().trim()+"'," + this.sqlzongheceping + ")";
String[] temps= this.yewuxuexi.split(“:”);
// SQL statement for inserting business learning scores into database
String temp=":insert into business learning score table (student number, remarks" +temps[0] +")
values(' "+this.xuehao.getText().trim()+"','"+temps[2] +"'" + temps[1]+ ")"; strshangchuan+=temp
;

6. User password modification module
The implementation interface of the user password modification module is shown in Figure 10:

Figure 10 Password modification interface diagram
This module class is also inherited from the Frame class in the java.awt package. First, check the "new password" and "confirm new password", and if they are the same, check the validity of the user. If it is a legal user, the password can be modified. After the database information is modified successfully, a "password modified successfully" message will be fed back to the user. Otherwise, the password cannot be modified, and a "password modification failed" message will be fed back to the user. Among them, the user's legality check is consistent with the user's legality check when the score is uploaded, so I won't go into details here, and only some of the core codes are explained as follows:
if(datain.readUTF().trim().equals("Password modification is legal User")) //If it is a legal user
{ //Password modification SQL statement
String xinmimashangchuan="update user information table set password='"
+this.xinkouling.getText().trim()+"'where student number='"
+this.xuehao.getText().trim()+“'”;
dataout.writeUTF(xinmimashangchuan); //Update database request to upload
}
else //Illegal user
{...}
7. Query module
The query module implements the interface as shown in the figure 11 shows:

Figure 11 Query interface diagram
It is divided into precise query and fuzzy query. The precise query uses the input student number as the query condition, while the fuzzy query uses the combination of business learning results and comprehensive evaluation results as the query condition. The results of the precise query will return the individual scores and the ranking of the comprehensive assessment and business learning results. Figure 12 shows the interface of fuzzy query return results:

Figure 12 Display of Fuzzy Query Results
When the values ​​of the business learning results and comprehensive evaluation results options are both 0, or the values ​​of both options are not 0, all result sets will be returned and arranged in order of student numbers. When the value of the business learning option is 0 but the value of the comprehensive assessment result option is not 0, or vice versa, an item other than 0 will be used as the basis for the arrangement and display. Its core code is as follows:
1) Accurate query
resultset= stmt.executeQuery("select * from comprehensive evaluation score table order by comprehensive evaluation score desc"); //Arrange results from high to low
while(this.resultset.next()) //Retrieve the student's comprehensive evaluation record
{ i++; //i marks the ranking of the student's comprehensive evaluation score
if(this.resultset.getString(1).equals(xinxis[1].trim()))
//If the The student's comprehensive evaluation record will extract all the scores and rankings
{jieguo+=“,”+this.resultset.getFloat(2) + “,” + this.resultset.getFloat(3)+“,”
+this. resultset.getFloat(4) + "," + this.resultset.getFloat(5)+","
+this.resultset.getFloat(6) + "," + i;
break; //jump out of search}
}

2) Fuzzy query
String mohuchaxunjieguo=datain.readUTF(); //Read the result of fuzzy query
//The following is the display of data in JTable
this.vector.removeAllElements(); //Clear the vector storing the displayed data
this.tm .fireTableStructureChanged(); //Notify all listeners that the table structure has changed.
String[] strmohuxianshis=mohuchaxunjieguo.split(“:”);
//Split the data string returned from the server into rows
for(int i=1;i<strmohuxianshis.length;i++)
{ Vector rowvector=new Vector( ); String[] strs=strmohuxianshis[i].split(“,”); for(int j=0;j<strs.length;j++) { rowvector.addElement(strs[j]); } //add one Display data item this.vector.addElement(rowvector); //Add a row to display data item } this.tm.fireTableStructureChanged();






Part of the SQL statement of the fuzzy query is as follows:
s="select user information table. student number, name, political quality, business learning, intelligence quality, sports quality, comprehensive evaluation score from comprehensive evaluation score table, user information table where business learning>= " + this.yewu.getfloat()+ "and comprehensive evaluation score>=" + this.zonghe.getfloat()
+" and comprehensive evaluation score sheet. student number = user information table. student number";

8. Score scale graph display module
The interface of this module is shown in Figure 13:

Figure 13 Score ratio diagram
Among them, the left and right blocks are two different instantiated objects of the same class. The implementation process of this module is:
first query the database, count the total number of people and the number of people in each grade segment, then calculate the proportion of the number of people in each grade segment to the total number of people on the client side, and finally draw the proportion map through the fillArc() method of the Graphics class The data is displayed through the text box, and its core code is as follows:
public void paint(Graphics g)
{ int int_red=(int)(bili[0]*360); //Calculate the degree of the central angle of the red sector int int_green=( int)(bili[1]*360); //calculate the degree of the central angle of the green sector int int_blue=(int)(bili[2]*360); //calculate the degree of the central angle of the blue sector int int_yellow=360- int_red-int_green-int_blue; //Calculate the degree of the central angle of the yellow sector, and draw a proportional map below g.setColor(Color.red); //Draw a red sector g.fillArc(startx,starty,endlen,endlen,0,int_red ); g.setColor(Color.green); //Draw a green sector g.fillArc(startx,starty,endlen,endlen,int_red,int_green); g.setColor(Color.blue); //Draw a blue sector










g.fillArc(startx,starty,endlen,endlen,int_red+int_green,int_blue);
g.setColor(Color.yellow); //绘制黄色扇形
g.fillArc(startx,starty,endlen,endlen,int_red+int_green+int_blue,int_yellow);
}

4.4 Problems encountered in the development process and solutions
Various problems were encountered in the development process of the entire project, but under the guidance of the teacher, they were all resolved.
1. The interface problem at the beginning
Since the calculation of each scoring item in the comprehensive evaluation is relatively complicated, the development of this system is to avoid the inconvenience caused by the complicated calculation, so it is very important to have an orderly and clear interface. When the design was first started, all scoring items were displayed on one page. As a result, it feels cluttered. Under the advice of the instructor, it was finally decided to display the four parts of "political and ideological quality", "business learning", "intelligence quality" and "sports quality" separately. Therefore, the CardLayout layout manager is used to realize the layout of the interface. This layout manager can help users deal with two or more members sharing the same display space [9], and finally the interface problem has been solved.
2. The problem of Applet accessing the database
In order to ensure the security, Java Applet has made strict restrictions in various aspects, so accessing the server-side database is complicated. I searched for information and learned that there are several ways for an Applet to access the server-side database:
1) The Java Applet directly accesses the server-side database, but it needs to configure a policy file [10]. This method is convenient for our developers, but it is troublesome for users, which contradicts the original intention of the design: user use.
2) Write agent software on the server side, which uses ASP ADO component and VBscript scripting language to write. It first uses the Request object to receive the input data stream from the client (Applet), here is the data query parameter (or other data) to meet the user's specific query requirements, and then uses the Connection object of the ADO component to establish a connection with the Web database According to the requirements of the query parameters, save the query data in the Recordset object, and then use the Write method of the ASP Response object to put the data into the data output stream buffer and wait for the communication with the client Applet [11]. The client (applet) communicates with the proxy software through the input and output stream provided by the URLConnection object. If this method is adopted, the initialization work of the database on the server side must be manually configured, and it is not convenient for users to use.
3) Write the agent software on the server side, but it is also written in Java. This is the approach used in this project. The communication between the agent software and the Applet is through the input and output streams provided by the Java Socket object. First, the Applet transmits the access request to the database to the agent software through the DataOutputStream, and the agent software reads the Applet's access request through the DataInputStream, then accesses the database and transmits the result to the Applet through the DataOutputStream, and the Applet reads the result of accessing the database through the DataInputStream. Moreover, the agent software written in Java can have an interface of an application program to realize the initial configuration of the database.
3. Problems displaying query results
When it was originally designed, the display result was presented on the text area, which was not beautiful. If the data query results are displayed in a table, it will give people a neat and clear visual effect. Since the JDK development toolkit provided by SUN is not a visual integrated development environment (IDE), it cannot display the query results in tables such as DBGrid as easily as Delphi and VB, so it can only be realized by writing code by yourself. In practical application, three classes of Vector, JTable and AbstractTableModel can be used to better solve this problem [12].
4. The display problem of the scale graph
When initially designing the scale graph display module, I hope to use the getGraphics() method of the Panel class instance to get the Graphics class instance, and then call the fillArc(int x, int y, int width, int height of the instance) , int startAngle, int arcAngle) method to realize the drawing of the contrast ratio map. However, NULLPointException always occurs during the operation, which is really puzzling. After searching a lot of information on the Internet, we know that when using the control's getGraphics() method to obtain an instance of the Graphics class, it must be obtained through this method after the control has been displayed. In the end, it is implemented by rewriting the paint(Graphics g) method of the Panel class. The Graphics object obtained from here must be an existing object, and there will be no exception during the running process. In the end, the display problem of the scale map was perfectly solved.

5 System operation and debugging
5.1 Test purpose
In order to ensure the normal operation of the system and discover potential errors and defects, the system was tested and debugged according to the basic principles of information system testing and combined with software testing methods.

5.2 Test environment
Machine configuration: AMD Sempron™ processor 2500+ 1.4GHz 256MB memory
Operating system: WINDOWS XP
Software operating environment: JRE 1.5.0; IIS 5.1

5.3 Test method and test process
This test mainly uses the black box test method to test the software from the functional aspect. It mainly runs the functions of the system. It mainly includes the tests of the following modules:
1. Political and ideological quality module:
check point: whether the calculation of each score item can be performed and the string of score description can be obtained. This module has passed the test.
2. Business learning calculation module:
check points: whether the course information can be extracted from the server when the Applet is initialized, and the business learning calculation interface can be obtained; when the agent software is not started or there is no course initialization information, can a prompt dialog box appear; Ability to perform correct calculations for business learning. This module has passed the test.
3. Intelligent quality module:
check point: whether the calculation of each scoring item can be performed and the string describing the score can be obtained. This module has passed the test.
4. Sports quality module:
checkpoints: whether the sports quality score can be calculated correctly; whether the character string for other score descriptions can be obtained correctly. This module has passed the test.
5. The uploading module of comprehensive evaluation results:
check points: whether the user’s legitimacy can be checked; whether the comprehensive evaluation scores and business learning results calculated by legal users can be uploaded to the server-side database. Can the corresponding information prompt box appear. This module has passed the test.
6. User password modification module:
check points: whether the new password can be checked with the confirmation password; whether the user’s legitimacy can be checked; if the user is legal, whether the database password can be modified; whether the modification is successful or not, whether there is a message prompt dialog box. This module has passed the test.
7. Test of the query module:
Checkpoints: Whether the student ID can be accurately queried for the student's information, if the database does not have such information, can a message prompt dialog box appear; can the fuzzy query be correctly queried according to the query conditions. This module has passed the test.
8. Scale map module test:
Checkpoints: Whether the accurate data of the total number of people and the number of people in each grade can be obtained from the server; whether the ratio of the number of people in each grade can be calculated; whether the proportion map can be drawn accurately in proportion. This module has passed the test.
5.4 Running and debugging results
All functional modules of the system have passed the test, which guarantees the normal and stable operation of the system to a certain extent. But in the running test of the system, some potential flaws are also found, and the system is further perfected by modifying these flaws.

Conclusion
This system adopts the object-oriented technology to develop, and according to the method of software engineering to test and debug, to ensure the normal and stable operation of the system, and realize the information processing of comprehensive evaluation. For students who have comprehensive evaluation calculation experience, it is easy to use this system; for freshmen who have never calculated comprehensive evaluation, this system is equivalent to playing a guiding role in comprehensive evaluation calculation. In addition, you can query relevant information and view the proportion chart of each grade segment, which is very helpful for students to understand the comprehensive evaluation situation of all students. However, with the widening of applications, the functions of the system need to be further improved.
Through the development of this project, I have a deeper understanding of Java and Applet, and the theoretical knowledge I learned during college has been better practiced. In the process of system development, I also encountered various problems. By solving these problems, my knowledge has been broadened, and more importantly, my ability to solve problems has been improved.

Acknowledgments
This article was completed under the careful guidance of the instructor, Mr. He Qiuhong. The weekly meeting and guidance
provided great help for the development of my system and the writing of the thesis. I would like to express my sincere thanks to Mr. He Qiuhong!

Guess you like

Origin blog.csdn.net/ambiguous__/article/details/130817714