201771010111- Rui red third experiment twinning project - "Northwest Normal University student epidemic reporting system" project report

project content
Course class blog link https://edu.cnblogs.com/campus/xbsf/nwnu2020SE
Operational requirements Links https://www.cnblogs.com/nwnu-daizh/p/12521474.html
Course learning objectives They (1) experience in software development cooperation, practice pair programming (Pair programming); (2) to master the method of operation Github collaborative development programs;
Knot the other school number - Name 201771010103- Chen Yaru
The blog knot the other job link https://www.cnblogs.com/980303CYR/p/12554361.html
This job helped me achieve learning objectives in what areas (2) on the use of githup; (2) the practice of software development in
Warehouse address link of the project githup https://github.com/980303/xiaochen1.git

Task 1: Reading - Chapter 3-4 content "of modern software engineering Construction of Law", to understand and master the style code specification, code design specification, code reviews, pair programming concepts;

Code Specification

Code style specification: The main provisions of the text. Coding style principles are: simple, easy to read, unambiguous, including for indenting, line width, bracket, branches, name, underlined, annotated, and the broken line the case with the processing of the blank row {}; indentation defined 100 characters; complex conditional expressions in parentheses represents the logical priority; there is a clear line breaks and branches; naming should follow the rules, concise and easy to understand.
Code Design Specification: involve programming, the relationship between the modules, the design mode. Such as for function, his most important principle is: do one thing and do it well. Goto can be used to achieve a single outlet. Some contents of the error handling, such as the proper use of assertions and other norms. The vast majority of functions of the program are implemented in a program, the principle function is only one thing to do; the use of the goto statement makes the program has a single outlet; even more time error handling procedures for implementing the function; all parameters to verify its correctness, verify the correctness of assertions;

Code Review

Whether looking at the code within the framework of standardized code correctly solved the problem. Code review of three forms: self-review, peer review, the review team.

  • Self-review: VS themselves own, with companion review of the standards themselves. Not necessarily the most effective, because the developers always too confident of their own, if sustained, is of great benefit to the individual.
  • Peer review: reviewer VS developers, simple, basic review means.
  • Review team: Team VS developers, have more stringent rules and procedures applicable to the key code, and after review no longer updated code, high coverage - there are many pairs of eyes staring at the program, but the efficiency may not be high.
The purpose of the code review:
  • Find the error code, such as coding errors and does not meet code specifications of the local team.
  • Find logic errors, the program can compile, but the logic of the code is wrong.
  • Discovery algorithm error, such as the use of the algorithm is not optimal, there is no deal and other border.
  • Identify potential errors and regression errors - before the current changes resulted in repair of the defect appeared again.
  • We may find areas for improvement.
  • Education (Educational each other) developers, teaching experience, so that more members are familiar with the code of each part of the project, while familiar with practical knowledge and application dependent.
Pair programming:
  • Refers to the analysis together, designing together, write together test cases, unit testing together, to do integration testing together, to write documents, etc., in a pair programming, as there are at any time to review and exchange of quality in all aspects of the program depends on one pair programmers in all aspects of higher levels of that place. Knot has the following benefits program:
  • The level of development, pair programming can provide better design quality and code quality, problem-solving ability and they work more. They cooperate with each other as well as the role of incentives, engineers see the ideas and skills of others, get real-time to explain, are motivated, in an effort to improve their level.
  • Developers own interests, pair work to bring more confidence, high-quality output can lead to higher satisfaction.
  • In business management level, pair can communicate more effectively, mutual learning and transfer of experience, knowledge sharing, better able to respond to the movement of persons.
Pair programming is divided into two roles:
  • Pilot: control keyboard input.
  • Navigator: play a pilot role.
Junction essentials of programming:
  • Driver: Write design documentation, coding and unit testing XP development process.
  • Navigator: Review the driver's documents; supervise the implementation of the driver of the development process; consider the unit test coverage; whether need to think how to reconstruct; to help solve the driver problem specific technical problems. Navigator can also be designed in TDD test case.
  • Continued rotation of the driver and navigator roles, do not work continuously over one hour, every hour worked 15-minute break, the pilot to control the time.
  • Active participation. Any task first and foremost the responsibility of two people, but also the responsibility of all.
  • Only gap in the level, there is no difference in level. Two pair, even though we may be different levels of seniority, but no matter the analysis, design, coding, both sides have equal rights of decision-making.
  • Set a good pair programming environment, seats, monitors, etc. should allow two people to comfortably discuss and work. If it is a remote pair programming, the network, voice communications, and screen-sharing program to be set up.

Task 2: Two two free pair, colorectal other side "of software engineering experiment two individual events," the project results to evaluate specific requirements are as follows:

1. Project Bowen job to read and comment, comment highlights include: Bowen structure, blog content, blog structure and PSP in "The object of the" relationship column, the PSP "program completed a total time of need" and "actual completion needs time "to explore the difference between analysis and reason two data will be released over the comment content to a blog comments section.

  • Knot the other blog links

https://www.cnblogs.com/980303CYR/p/12514601.html

  • Github links to other nodes warehouse project

https://github.com/980303/xiaochen

  • Blog comments

  • Code Checklist

SUMMARY section
of code can meet the requirements and specifications it? A: can meet the needs and specifications.
If the code design comprehensive consideration? Answer: not very comprehensive, revised many times, the beginning part of the design may have some problems.
How to code readability? A: The easy to understand.
Code is easy to maintain it? A: relatively easy.
Each line of code execution and examine it, huh? A: Yes, I checked.
Design Specification
whether designed to comply with known design patterns or items commonly used mode? A: Yes.
There are no hard-coded or strings / numbers, etc. exist? A: There are a part.
There is no code that depends on a certain platform, whether it will affect the future of transplantation (such as Win32 to Win64) Answer: no influence depend, will not.
Developers write new code to be able to use the existing Library / SDK / Framework in functions to achieve? Whether there is a similar function in this project can call without having to re-implement all? A: You can achieve, does not exist.
There are no unused code can be cleared? (A lot of people want to keep as much code as possible in the future will spend, this has led to a program file has many commented the code, the code can be deleted, because the source code control has saved the original old code.) A : there has been cleared.
Code specification part of
a modified portion of the code in line with the standards and style it (the detailed provisions omitted)? A: compliance with coding standards.
Specific code section
there is no error processing? For external function call, check the return value or exception handling? A: After the access to information and found basically no discussion.
Parameters passed with no errors, the length of the string length byte or character (may be single / double-byte), the start count is 0 or 1 starts to count? A: The basic error, length of the string is the length in bytes, 0 to start counting.
How boundary conditions are treated? How Default Switch statement is processed? Is it possible to loop an infinite loop? A: By checking code and discussion, the cycle will not be an endless loop.
There is no use assertion (Assert) to ensure that the same conditions that we think really meet? A: No use.
Use of resources, is where to apply, where to release? Is it possible to cause resource leaks (memory, files, various GUI resources, database access connections, etc.)? Is it possible to optimize? A: Because there is no on-line use, basic does not cause resource leaks, not optimized.
Whether the data structure elements are used? A: After the examination did not.
Effectiveness
Effectiveness code (Performance) How? The worst case is what? A: The code is correct, the program runs properly, large data can be slow.
Code, especially if there are significant portions of the cycle can be optimized (C ++ repeatedly create a class, whether in C # StringBuilder string operation can be optimized)? A: There can optimize the part, but it does.
The normal operation of
whether the time-out for system and network calls? How to deal with? A: not time out, the data is too large may be a little delayed.
Readability
code readability how? Is there enough comments? A: The code is not very complex and important part added a note.
Testability
of code need to update or create a new unit test? You can also have checklists developed for specific areas (such as databases, web pages, multi-threading, etc.). A: The latter part of the page can increase UI design aspects, there is a better user experience.

According to the findings of a review of attempts to use github Fork, Clone, Push, Pull request , Merge pull request and other operations on the personal companion source project repository cooperation modification.
pork partner code

clone code to local partners to facilitate the operation of


the project after the other changes uploaded to the warehouse

Task 3: The two pair programming mode, combined with our teachers and students daily epidemic reporting system experience, design and development of an information system in line with our school epidemic prevention and control requirements, so that it has the following features:

(1) all kinds of school staff and students can gather disease information;
(2) each of the two departments responsible for epidemic prevention and control work of the department staff can view summary epidemic and provide advanced query features a combination of multi-attribute query and visualization of statistical functions;
(3) prevention and control of a designated person in charge of the school Login "Northwest Normal epidemic prevention and control statistical information" subsystem, you can browse a list of all persons reporting aggregated data, use [] advanced query data can be combined screening system to graphically display each college has students reporting and non-reporting statistics and key data statistics of the epidemic, [export] can query EXCEL file list;
(4) human-machine interface requirements GUI interface (WEB page, APP page can be);
(5) additional sub-functions: the timing of completing the alert

1. needs analysis statement.

The end of December 2019, China Wuhan happen novel coronavirus (2019-nCoV) infected with pneumonia epidemic in order to curb the spread of the epidemic, effectively cut off the transmission of the virus, under the guidance of the central government, government departments at all levels to take a series of prevention and control measures: since 2020, at 10:23 on January Ri Wuhan "closed city", 31 provinces and municipalities have also implemented strict control measures; provinces and cities nationwide to send medical teams to participate in rescue work and Wuhan, Hubei; deployment in the country masks, protective clothing, medicines and other urgently needed medical resources to support Wuhan; to guide and supervise enterprises with production qualification of medical supplies across the country to resume production capacity as soon as possible; directed special financial allocation of funds for disease prevention and control; Wuhan guarantee supplies from other provinces to mobilize people's daily lives.
  It is worth mentioning that the Chinese Internet companies played an important role in the governance of social epidemic prevention and control. Tencent, for example, about the response to the outbreak control needs to develop a dozen a product. Where the epidemic online inquiry function, to reduce the mutual cross-infection between patients with fever have an important role in patients at home through the Internet Dr. Xiang Zaixian inquiry, reduces the risk of transmission of the virus or infection; rumor smash for the public to take a rational attitude towards the epidemic the development of great significance. Wuhan travel drops also set up a special team to serve the commuter medical staff, which plays an important role in the implementation of Wuhan traffic control. In addition, the new pneumonia patients diagnosed with stroke query tool, users only need to enter their own time by public transport and trips, you can confirm whether the infection was diagnosed counterparts, ahead of self-isolation and treatment work. In epidemic prevention and control, the Chinese Internet companies not only grow in terms of social responsibility has become increasingly mature.
Collection, statistics and troubleshooting information about the epidemic prevention and control mechanism for effective cooperation, our school has developed a faculty / student epidemic reporting system to report daily by the staff of the epidemic, the epidemic of students reported daily, daily epidemic secondary sector summary table, four statistical reporting epidemic prevention and control subsystems. To achieve the basic situation of our school all categories of personnel, the regions and information gathering activities and track health. On this basis, it provides advanced query, relatively visualization capabilities, timing functions as well as export to excel function table.  
Software Design Description.

2. Functional Design
  • Basic functions
    (1) user login interface, with the account number and password can log on.
    (2) Acquisition of students epidemic information every day, and only upload once per person per day.
    (3) The administrator can insert delete modify information.
    (4) landed administrator can view the colleges reporting cases, students summarize data, key statistics epidemic.
    (5) in the form of visual diagrams of statistics.
    (6) into the background administrator management system, data can be exported epidemic students to excel.
  • Expansion feature
    regular reporting remind
3. Design and Implementation

User class, implement the user's login, check status inquiry epidemic data, export to excel, sorting, etc.
student class, information collection, storage, inspection, inquiries and other functions
complete separation between classes, with additions and changes to the data check function, you have to get specific dates and other functions. There is relatively fixed relationship between function calls.

4. Function Screenshots
Database established:


login interface

Member information:

Add member information:

Add outbreak information:

Query epidemic information:

summary graph

export data

Important Code Screenshot

package 疫情;

import java.sql.*;  
import javax.swing.*;  
import java.awt.*;  
import java.awt.event.*;  
import java.awt.Color; 

public class LLogin {
	
	 public static void main(String[] args) {  
	        new loginFrame();   
	    }  	  
	} 
 	
	class loginFrame extends JFrame implements ActionListener{  
	    Box box1,box2,baseBox;  
	    JLabel userName,userPwd,tubiao;  
	    JTextField nameField;  
	    JPasswordField pwdField;  
	    JButton button;  
	    JTabbedPane choose;  
	    JPanel panel1,panel2;  
	    loginFrame(){  
	        setBackground(Color.white);  
	        userName=new JLabel("账号",JLabel.CENTER);  
	        userPwd=new JLabel("密码",JLabel.CENTER);  
	        nameField=new JTextField(8);  
	        pwdField=new JPasswordField(8);  
	        panel1=new JPanel();  
	        panel2=new JPanel();  
	        choose=new JTabbedPane();  
	        choose.add("登录界面",panel1);  
	        panel1.setLayout(new GridLayout(2,2));  
	        panel1.add(userName);panel1.add(nameField);  
	        panel1.add(userPwd);panel1.add(pwdField);  
	        add(choose,BorderLayout.CENTER);  
	        button=new JButton("登陆");  
	        add(button,BorderLayout.SOUTH);  
	        button.addActionListener(this);  
	        //小图标
	        ImageIcon tubiao=new ImageIcon("file:///D:/Program%20File/eclipse-workspace/疫情上报/src/疫情/层云.jpeg"); 
	        setIconImage(tubiao.getImage());  
	        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
	        setVisible(true);  
	        setBounds(200,100,500,200);  
	        setTitle("疫情信息管理系统");  
	        validate();  
	    }  


	    public void actionPerformed(ActionEvent e){  
	        String name,pwd;  
	        name=nameField.getText();  
	        pwd=pwdField.getText();  
	        try{  
	          Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); //加载数据库驱动 
	           
	        }  
	        catch(ClassNotFoundException ex){  
	        System.out.println(ex);  
	        }  
	        try{  
	            Connection con;  
	            Statement sql;  
	            ResultSet rs;  
	            String url,userName,userPwd;  
	             // 连接数据库的语句
	            url="jdbc:sqlserver://localhost:1433;DatabaseName=Student";
	        
	            userName="sa";  
	            userPwd="chenke010919chan";  
	            con=DriverManager.getConnection(url,userName,userPwd);  
	            sql=con.createStatement();  
	            rs=sql.executeQuery("select * from login where name ='"+name+"' and pwd='"+pwd+"'");  
	            int q=0;  
	            while(rs.next()){  
	                q++;  
	            }  
	            if(q>0){  
	                JOptionPane.showMessageDialog(this, "登陆成功!","消息对话框",JOptionPane.WARNING_MESSAGE);  
	                this.dispose();  
	                new CommFrame();    
	                  
	            }  
	            else  
	                JOptionPane.showMessageDialog(this, "账号或者密码错误!","消息对话框",JOptionPane.WARNING_MESSAGE);  
	        }  
	        catch(SQLException exp){  
	            System.out.println(exp);  
	        } 
	        
	    }  
}

Twinning process description is provided in the discussion of the two, or micro-channel QQ refinement and programming screenshot

The PSP provides a knot on the job

PSP2.1 SUMMARY Plan time (min) required to complete a total of The actual time required to complete
Planning plan 30 25
Estimate It estimated that the task requires much time and planning generally work steps 30 30
Development Develop 1140 1300
Analysis Needs analysis (including learning new technologies) 98 120
Design Spec generate design documents 34 20
Design Review design review (and colleagues reviewed the design documents) 2 0
Coding Standard code specification (to develop an appropriate specification for the current development) 33 32
Design Specific design 34 25
Coding Specific coding 1100 1100
Code Review Code Review 30 24
Test Test (self-test, modify the code, submit modifications) 60 88
Reporting report 180 165
Test Report testing report 40 35
Size Measurement Computing workload 7 6

Summary: The two have worked together really bring Effect 1 + 1> 2 do? Through this twinning, please talk about your feelings

  • Pair programming pros and cons, but overall more good than harm, the effect of 1 + 1> 2, and twinning partners in the process of pair programming, two people can help each other to solve each other's problems, equivalent to their side more than a mentor, you may not take into account the issues she will take into account, can do complement each other. Drawback is that people think of different directions, disagreement, pre-machine environments we do not agree, different problems arise programming process, it is not easy to solve.

End ------------ ------------ restore content

Guess you like

Origin www.cnblogs.com/LRHLRH123----/p/12589335.html