201771030109- Li Pei Shan experiment two personal projects - "Northwest Normal University student epidemic reporting system" project report

The second experiment "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/12416880.html
My course learning objectives (1) personal project control software development process;
(2) to master the methods of operation Github publishing software projects.
This job helped me achieve learning objectives in what areas (1) improve their programming skills in program design;
Github repository project link address https://github.com/lipeishan82/-

Content Experiments

Task One: Statement of students reported daily epidemic subsystem experience

(1) When not used before the information can be recorded the day before, after the upgrade, the day before the information can be recorded, which gives the same information people provide a great convenience;
(2) the interface is relatively simple, immunization statistics information is also more comprehensive;
relatively limited (3) to fill in time, the presence of the day forget to fill in, you can add a reminder functions, thus reducing the incomplete data of the day phenomenon.

Task two: summary read "Building the Law" Section 1-2, in conjunction with Chapter 2, Section 2.3 PSP process, develop a mind of your own, Northwest Normal University students daily epidemic reporting system.

I chose the first class development:
  there is a data file that stores all the information 100 days 2000 epidemic prevention staff / students, please design a command line program that supports queries in person one day the epidemic situation, some kind of query data weekly / monthly statistics of the epidemic situation, and show statistics histogram.

1. Demand Analysis:

  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. Teachers and students access to the system for remote reporting of information by our university enterprise micro-channel service hall.

2. Functional Design:
  • basic skills:
    • Queries someone epidemic situation in a given day
    • Epidemic statistics query some data week / month
    • Histogram display statistical results
  • extensions
    • For students, teachers and staff sick View
    • Given time interval of personnel epidemic situation in the inquiry period of time
    • For added teachers, teacher epidemic information, students, epidemic information

3. Design and Implementation:

My database design: I designed four tables, each table is a teacher, student table, teachers and students epidemic prevention table table, I believe that teachers and students table table is available directly from the school's Office of Academic Affairs, and the outbreak of a sudden, if re-establishment of a new form would be a waste of time, there is no epidemic prevention information table and the table is set up a table.

Specifically designed as follows:
Teacher table (job number, name, sex, lies province, city)

teacher epidemic table (job number, whether there are symptoms, if confirmed, the day temperature, fill in the date)

Student Form (student number, name, sex, where the province, city)

student immunization form (student number, whether there are symptoms, if confirmed, the day temperature, fill in the date)

According to the database I created several classes as follows:
(1) defines a class used for database connection.
(2) the definition of the student class, declare private variables student_id (Student ID), stu_sex (sex), stu_pro (student's province), stu_city (student city); definition of variable content database class teachers and teachers corresponding table, as well as teachers table prevention information and student information table in both classes in addition to the two tables in the database corresponding attribute in addition, I also defined a variable checknum a number of statistical diagnosis, easy to produce a histogram.
(3) defines the class for data operations, respectively, may be teachers, and students to perform both operations simultaneously.
(4) defines a class used to generate the histogram, the histogram due to my design students and teachers is to generate the corresponding histograms respectively, it contains two different classes. JfreeChart using technology.

Important functions:
(1) the database connection, if this does not exist, then the connection is not more talk about how the database query and generate histogram data.
(2) a function of generating a data set, it generates data for generating a histogram of the results of Table later played a crucial role.
(3) a function of a series of operation of the database, the first step is accurately output.

4. Test run:

I put my project to export jar, can be run directly from the command line, since the data is 2000 I imported the data into the database, there may be some discrepancy with the actual situation, and smaller amounts of data, when the amount of data may occur when too much influence on a certain time

on the picture shows the command line, personnel and information regarding the implementation of the added functionality



prevention information on the above two graphs show the teachers and students, it can be seen adding the command line the success of data

can also be diagnosed personnel information output

Can be queried by date and ID, you can also provide information only id be all queries, and query information of all personnel to provide a period of time, because the students and teachers can be so in this show only a


display histogram is based on respect the number of men and women diagnosed daily staff made
teachers histogram shown:

Students histogram:

The key code:

    /**
     * 使用查询数据库的数据
     * @return 数据集
     * @throws Exception
     */
private static CategoryDataset getDataSet() throws Exception {
        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        java.util.List<Teacherinfo> list = CheckTeacher();
        //装成JFreeChart需要的数据集
        for (Teacherinfo teacherinfo : list) {
            SimpleDateFormat sdf = new SimpleDateFormat("MM-dd");
            String str = sdf.format(teacherinfo.getDate());
            dataset.addValue(teacherinfo.getChecknum(), teacherinfo.getSex(), str);
        }
        return dataset;
    }

    /**
     * 根据工号查询信息
     *
     * @param con        连接数据库
     * @param teacher_id 针对teacher_id进行查询
     */
    public void selectTeacherById(Connection con, int teacher_id) throws SQLException {
        String sql = "select * from teacher t, teacher_info t1 where t.teacher_id = t1.teacher_id and t.teacher_id=?";
        PreparedStatement pstmt = con.prepareStatement(sql);
        pstmt.setInt(1, teacher_id);
        rs = pstmt.executeQuery();
        display();
    }

6. Summary

I create for each object of each class, for different groups of search queries and other operations are also carried out to create different classes, and finally the histogram display also be written classification, thereby realizing a modular. Just start writing a blog when data is relatively small, the overall speed is faster, it may take time to produce near-10s in addition to generating an output histogram, and then I turn increased to 2000 data, some slightly slower speed, then back data after rising, I will continue to test the function of the project to achieve time-consuming cases. Since bad shots cut after the database is increased, so that, when the theme is carried out in a small database. Code exists some cases redundant, I will continue to be amended deletion.

7.PSP:

PSP2.1 SUMMARY Plan time (min) required to complete a total of The actual time required for completion (min)
Planning plan 8 8
  ·Estimate It estimated that the task requires much time and planning generally work steps 8 8
Development Develop 665 710
   ·Analysis Needs analysis (including learning new technologies) 60 100
   ·Design Spec Generate design documents 20 20
   ·Design Review Design review (and colleagues reviewed the design documents) 0 0
   ·Coding Standard Code specifications (development of appropriate norms for the current development) 15 15
   ·Design Specific design 90 120
   ·Coding Specific coding 360 320
   ·Code Review Code Review 60 45
   ·Test Test (self-test, modify the code, submit modifications) 60 90
Reporting report 65 90
   ·Test Report testing report 30 60
   ·Size Measurement Computing workload 20 10
   · Postmortem & Process Improvement Plan Later summarized, and process improvement plan 15 20

  Because in the course of each run, more or less there will be some inevitable problems, so we continue to improve, at the time of writing the last blog, or feel some function problems, but also continue to modify their procedures, hope to have better the sense of experience. Before the time of writing program code specifications actually not very careful, to see through the "code of efficient _ Alibaba Java Development Manual" to learn the code specifications, as well as writing the code for future readability has been a great help.

Task three: 2 to complete the task of project development, will submit a complete project file to my project source projects registered Github account warehouse, complete individual project reports Bowen jobs.

  GitHub project has been submitted here , you can refer to this period when writing README blog yo

  Completed blog writing

to sum up:

  By implementing this epidemic prevention system, I have to deep understanding of the importance of the PSP, but also for writing SQL statements have a certain look back, but also learn how to use JFreeChart graphical user interface design, improved programming capabilities but also we know about the specific implementation program specification. I will continue to improve my performance, efforts toward a better direction.

Guess you like

Origin www.cnblogs.com/lipeishan/p/12464106.html