The experimental report of the four experiments of the "Software Engineering" course ("Feasibility Study and Project Plan", "Requirement Analysis", "System Design", "System Implementation")

Experiment 1 " Feasibility Study and Project Plan "

Experimental hours: 2    Experimental location: any  Experimental date: December 15                              

1. Purpose of the experiment

  1. Understand: the basic principles and methods of software project feasibility study and project planning;
  2. Mastery: Tools such as Visio for feasibility studies and project planning.

2. Experimental content

The library management system makes it easier to classify and manage books, and limits the time for borrowers, making borrowing books more efficient and safer. It improves work efficiency, is easy to operate, can effectively update and query data, and can realize automation to a certain extent. The main functions of the library management system are: bibliography management, library card management, borrowing and returning books, query, and payment. The bibliography management is mainly for the identity of the administrator (such as adding a bibliography, deleting a bibliography, etc.); the management of the library card is divided into five parts: registration, reissue, report of loss, suspension, and cancellation; borrowing and returning books: borrowing books, returning books, etc. Books; inquiry: Book inquiry and payment of borrowing time are mainly to calculate the overdue fine and pay the fee.

The system flow chart of the library management system is shown in Figure 1.

 

System flow chart

Try to conduct a feasibility study on the system, use Visio to draw the system flow chart of the library management system, and at the same time formulate the system development plan, and use the Gantt diagram and timeline diagram to describe the schedule and arrangement.

3. Experimental method :

  1. Run the rapid application development model (RAD) for development analysis of the library management system;
  2. According to the experimental content, that is, the project needs, the project is modeled and analyzed;
  3. Use Visio tools to build system flow diagrams, Gantt diagrams, and timeline diagrams for the library management system;
  4. Use each model drawn in step 3 to conduct further development feasibility analysis and planning analysis of the project.

4. Experimental steps ( Visio2003 )

Basic steps to draw a timeline diagram:

  1. Select [File]/[New]/[Project Plan Diagram]/[Timeline] from the Visio main menu, select a timeline and drag it into the drawing page.
  2. Select a milestone in the shape template and drag it into the drawing page;
  3. Set milestone date and date format in configure milestone dialog;
  4. Select a spacer block in the shape template and drag it into the drawing page;
  5. Set the start and end date and date format of the interval block in the configure interval block dialog;
  6. set title;
  7. Set today's time;
  8. set the background;
  9. Set the elapsed time.

Basic steps to draw a Gantt diagram:

1. Set the Gantt diagram options;

2. Set and configure working hours;

3. Set task name, start time, end time or task duration;

4. Set the title and other information.

5. Experimental results

The flow chart of the library management system system is drawn :

Library management system flow chart

 

Library Management System Flowchart - Student Module

Flow chart of library management system - administrator module

 

A Gantt diagram of the library management system is drawn :

 

Gantt diagram of library management system

A timeline diagram of the library management system development plan is drawn up :

Timeline Chart of Library Management System Development Plan

6. Experimental conclusion

This experiment is mainly to analyze the development plan of the library management system, and develop more efficiently by drawing the model. The main results are the flow chart, Gantt diagram and timeline diagram of the library management system shown in the fifth point.

Through the analysis of the five drawn models, the development feasibility and specific development process of the library management system are further confirmed. Transforming many unpredictable things in project development into predictable things is conducive to the specific implementation of the project.

7. Experimental summary

Through this experiment, I mainly learned to model and analyze the project, such as system flow chart, Gantt diagram, timeline diagram, etc. Based on each model, it is further conducive to the development and actual implementation of the project.

In the course of this experiment, the main problem encountered is that I am not familiar with the use of Visio tools, and I don't know how to design the various components of many models, so the model has certain deficiencies.

The solution is mainly to use the PPT and video uploaded by the teacher for independent learning, or to search through Google and try to solve it many times.

The shortcomings of the experiment are mainly that each model may not be comprehensive, a certain component is missing, and some designs may not be fully planned. The reason for the problem is that the use of Visio drawing tools is too little, and I will continue to learn and strengthen exercises in the future, and then improve each model.

When using visio for the first time, I feel the power of this tool. I have been using the Edraw icon before, and the way to save pictures is to use screenshots, which is very inconvenient and does not achieve the effect. Visio is more convenient and can save various formats. Moreover, various diagrams can be drawn, including well-known flowcharts, as well as software engineering professional diagrams such as Gantt charts.

Experiment 2 " Needs Analysis "

Experimental hours: 2    Experimental location: any  Experimental date: December 18                           

1. Purpose of the experiment

  1. Understand: the basic principles and methods of software project requirements analysis;
  2. Master: use case modeling method, data flow modeling method and IDEF1X data modeling method;
  3. Master: Visio/EA and other tools to draw model diagrams.

2. Experimental content

1. Please find out the four components of drawing a data flow diagram from the description below and use Visio to draw a data flow diagram.

A training center wants to develop a computer management system. Its business is: after collecting and classifying the letters sent by the students, they handle them according to several different situations.

(1) If you are registered, send the registration data to the staff in charge of registration. They will check the course files to check whether the course is full, and then register on the student files and course files, and issue a report to the financial Departments, financial staff issue invoices to students.

(2) If you want to cancel the courses you have taken, the cancellation personnel will make corresponding changes in the course files, student files and account files, and give students a cancellation form.

(3) If it is paid, the financial staff will register it on the account file and give the student a fee receipt.

2.  There is a simple course selection system, described in words as follows, use IDEF1X diagram and UML class diagram to describe the information model of the system, and use Visio or EA to draw the IDEF1X diagram and UML class diagram.

1) Basic description : In this system, there are entities such as colleges, teachers, courses, and students, and their attributes are:

College: basic attributes such as college number, college name, address, contact number, dean, etc.;

Teacher: attributes such as teacher number, name, gender, age, professional title, and college;

Course: course number, course name, course nature (compulsory/elective), credits, course offering college and other attributes;

Students: student number, name, gender, age, enrollment time, college and other attributes.

Teaching class entity: teaching class number, class teacher, course, class term, class time, class week.

2) The functional requirements are as follows :

(1) The maintenance of basic information can be completed: that is, the addition, deletion, modification, and query of the basic information of each entity.

(2) Arranging courses: Arranging courses for teachers in one semester. A teacher can teach one or more courses in one semester, or not; a course can be taught by multiple teachers, but the classes taught by different teachers should belong to different teaching classes.

(3) Students choose courses: Students choose courses according to teaching requirements. Before students choose courses, check whether the students are eligible for course selection (such as whether they are in arrears, whether the previous courses have been completed and passed); a student can choose multiple courses, and a course can be taken by multiple students, but a student cannot choose the same course. Different teaching classes of a course; if a student chooses a certain teaching class of a course and then chooses another teaching class of the same course, the system should give an error prompt; count the number of students in the selected teaching class; select a teaching class The number of places is limited; after selecting a course, if the student finds that the course selection is unreasonable, he can withdraw or re-select; after the course selection is completed, the function of printing the curriculum should be provided.

3. Please use Visio or EA to draw the use case diagram shown in Figure 2.

 

Figure 2 Use Case Diagram

3. Experimental method :

Use Visio2016 tools to design data flow diagrams, UML diagrams and IDEF1X diagrams.

4. Experimental steps (visio20 16 )

The basic steps to create a data flow diagram:

  1. Open Visio, go to "File/New/Software and Database/Data Flow Model Diagram";
  2. First establish the process, data storage and interface in the model explorer;
  3. Then drag relevant elements into the drawing page;
  4. Finally add the required data stream;
  5. Repeat the above steps to complete the data flow modeling.

Basic steps to create IDEF1X diagram:

  1. Select the main menu: "New/Database/Database Model Diagram";
  2. Open the database model diagram;
  3. On the Database menu, point to Options , and click Documentation ;
  4. Click the General tab, next to Symbol Sets , click IDEF1X  or Relationships , and click OK .

Basic steps to create a use case diagram:

  1. Open Visio, go to "File/New/Software and Database/UML Model Diagram";
  2. Right-click on the top-level package of the use-case model;
  3. Select [Create]à[Use Case Diagram];
  4. Rename the blank use case diagram in the "Model Explorer";
  5. Drag the System Boundary from the Use Case shape set in Shapes to the Use Case Diagram;
  6. Drag actors from the Model Explorer to the use case diagram;
  7. Drag the use case from the "Model Explorer" to the use case diagram;
  8. Establish the relationship between actors and use cases in the use case diagram.

5. Experimental results

Record experimental output data and results.

1. The data flow diagram of experiment 1 is as follows:

 

2. The UML diagram of Experiment 2 is shown below

 

3. The IDEF1X diagram of experiment 2 is as follows:

 

4. The use case diagram of Experiment 3 is as follows:

 

 

 

Purchasing personnel can log in to the system, form orders, cancel orders, fill in orders, check quotations, and submit demand forms;

  Customers can form orders;

  The department head can sign the report;

  Financial personnel can query financial data, check basic price lists, verify pre-sale forms, and verify pre-sale orders;

  Billers can print out the information they can view, such as documents and bills of lading;

  The warehouse clerk maintains the storage and delivery status of the entire warehouse, and is responsible for issuing storage orders, reviewing storage orders, printing and exporting data, etc.;

  Logistics personnel can print out the information they can view, such as processing orders, transportation orders, storage orders, etc.;

6. Experimental conclusion

This experiment is mainly to analyze and model the requirements of the project, including data flow diagrams, UML diagrams and IDEF1X diagrams, etc. Through a series of modeling, we can better understand the requirements and facilitate the development of project planning.

From big to small, from difficult to easy, this is engineering thinking. Especially when analyzing the needs, it must be run through from beginning to end. It is not easy to understand the needs of users, and to express what you want to understand clearly and concisely, but it is very important. Unclear user needs and incomprehensible forms of expression will inevitably lead to unsuitable product development, which must be avoided, starting from the root cause and demand analysis.

7. Experimental summary

Through this experiment, I mainly learned to draw some common models in projects, such as data flow diagrams, UML diagrams, IDEF1X and use case diagrams, etc., and then abstract the requirements through the models, and get the parts I care about, which is conducive to the development of the project conduct.

The main problem encountered in the experiment is that the precautions for model drawing are not well understood, such as how to classify IDEF1X entities, how to define the relationship between entities, etc. The solution is mainly through repeated reading of books and case analysis, followed by a part of the relationship I can't determine how to display it in the model. This is mainly solved by communicating with classmates. If it still can't be solved, I will ask the teacher for advice.

The main thing to be improved is that some requirements cannot be displayed in the specified model, and other models will be considered for display in the future. In addition, the relationship in the use case diagram is not fully displayed and needs to be further optimized. It is inevitable that all user needs cannot be shown in one diagram. You can use another picture or a group of pictures to assist the explanation, but the effect of this explanation is limited. If you use 100 pictures and 1000 words to explain a thing, and then use other things to explain your explanation , and will lead to redundancy. Pay attention to ability when explaining requirements, and use precise explanation forms to accurately explain the problems you want to express and the real needs of users. Data flow diagrams, UML diagrams, IDEF1X and use case diagrams in software engineering are such concise expressions.


Experiment 3 " System Design "

Experimental hours: 2    Experimental location: any  Experimental date: December 20                         

1. Purpose of the experiment

  1. Master: structured data flow design technology, object-oriented design technology;
  2. Master: Visio tool to draw software structure diagram;
  3. Master: EA or Visio tools to draw UML model diagrams.

2. Experimental content

1. Try to design the training center management system in Experiment 2 with a structured design method, and use Visio to draw its corresponding software structure diagram. (optional)

2. The description of an indoor thermal insulation system is as follows:

If the main switch is placed in the " heating " state, the controller of the insulation system is responsible for switching the boiler on and off, monitoring the fuel flow and combustion status of the boiler system, and then adjusting the heat flow into the room. When the indoor temperature drops below ( T r -2 ) degrees, the controller starts the boiler. Here T r  is the ideal room temperature set by the user. The boiler startup process is as follows:

( 1 ) The controller sends a signal to the motor of the boiler;

( 2 ) The controller monitors the motor speed. When the motor reaches normal operating speed, start the ignition and open the oil valve;

( 3 ) The controller monitors the water temperature, and  once the water temperature reaches a predetermined value,  it sends a signal to open the water circulation valve. Hot water begins to circulate in the room.

( 4 ) If any abnormal situation occurs, the fuel flow indicator and light sensor will send a signal to the controller. At this point the controller sends a signal to shut down the system.

( 5 ) Once the indoor temperature reaches ( T r -2 ) degrees, the controller first closes the oil valve, and after a delay of 5 seconds, closes the boiler motor.

The system must meet the following constraints:

(1) The restart of the boiler must be delayed for 5 seconds after shutdown;

(2) The boiler should be instructed to stop within 5 seconds after the main switch is closed or the oil valve is closed .

Try to design the system based on this, use Rational Rose to draw the state diagram of the controller, and use the sequence diagram to describe the boiler startup process.

3. Experimental method :

  1. The experimental method is mainly to use Visio tools to draw software structure diagrams, state diagrams and sequence diagrams;
  2. The principle of the experiment is to draw according to the requirements of the topic and graphics;
  3. The experimental technique is Visio drawing;
  4. The experimental plan is to first mark the requirements in the topic according to the requirements of the topic, then record the precautions of the graphics to be drawn, and then draw the first draft. After the first draft is drawn, check the key points of the graphics, and finally optimize the graphics display.

4. Experimental steps

Basic steps to create a software structure diagram:

1. First add the function/subroutine;

2. Add a conditional call;

3. Then add the calling connection;

4. Finally add the data flow or flag flow for the call line.

The basic steps for EA to build UML diagrams:

1. Start the EA, create a new model, and save the model;

2. Create a model under a certain view.

5. Experimental results

Record experimental output data and results.

The software structure diagram of the training center management system in Experiment 2 is as follows:

The state diagram of the controller looks like this:

 

 

The sequence diagram of the boiler start-up process is shown below:

 

6. Experimental conclusion

Analyze and describe the experimental data and results, and give the experimental results and conclusions.

This experiment is mainly for the system design of the project, including software structure diagrams, state diagrams and sequence diagrams, etc., through a series of modeling to better understand the project implementation process, which is more conducive to the development of project planning.

    See the fifth point for screenshots of the experimental results. For " If the main switch is placed in the " heating " state, the controller of the heat preservation system is responsible for switching on and off the boiler, monitoring the fuel flow and combustion status of the boiler system, and then adjusting the heat flow into the room. When the indoor temperature drops to ( T r -2 ) Below the temperature, the controller starts the boiler " This process is clearly explained. At the same time, the form and steps of realization are also given. It is clear at a glance and facilitates the realization of subsequent steps and the development and utilization of subsequent personnel. Connecting upstream and downstream is a proposition that an engineer or a designer must face. Only by handling this proposition well can we be reliable and responsible.

7. Experimental summary

Through this experiment, I mainly learned how to systematically design the project, abstract the system as a whole, and extract the content I care about, which is beneficial to the subsequent development of the project. The software architecture diagram mainly shows the main framework of the project, which is conducive to the overall analysis and planning of the project. The activity diagram and sequence diagram are mainly for further analysis of the system, which is conducive to the actual development of the system. In short, it is a lot of benefits.

The problems encountered in the experiment are mainly that the components of the graphics are not clear enough, which can be solved by consulting books and network materials, and some content cannot be clearly expressed, which can be solved by communicating with classmates after class.

The shortcomings of the experiment are mainly that the relationship in the graph is not well understood, and there may be errors in some places.


Experiment 4 " System Implementation "

 

Experimental hours: 2    Experimental location: any  Experimental date: December 25                           

1. Purpose of the experiment

  1. Master: related technologies and related tools for system implementation.

2. Experimental content

1. Try to implement the course management object class diagram shown in Figure 3, using Java to code and implement under Eclipse, and use the JUnit framework to test a certain Java class.

 

Figure 3 class diagram

2. For a website, use selenium or SilkTest or SilkPerformer to perform functional testing and performance testing respectively. (optional)

3. Experimental method requirements:

  1. Students can only enter the laboratory for computer experiments after completing the preview report and familiarizing themselves with the experimental content. The experiment is conducted in a group of 1 person, and the students complete the experiment independently.
  2. Students analyze the problem and become familiar with the description of the process of solving the problem. It is required to record the process of the computer experiment, and the students can leave the laboratory only after being approved by the instructor.
  3. After the experiment is completed, submit the experiment report.
  4. The experiment process is supervised by the instructor and obeys the arrangement and supervision of the teacher.
  5. Use the pycharm tool and python code to implement the course management system;
  6. Use testing tools such as doctest and unittest in python to test the code in the system.

4. Experimental steps

1. Enter: [Preferences] under the [Window] menu, select the Java support:

    1. Detect installed JRE;
    2. Set workbench options;
    3. Set new project options;
    4. Set up the Java editor.

2. Select [File]->[New]->[Project], select [Java]->[Java Project] from the pop-up window, and click Next;

3. Enter the project name, and determine the file directory where the project is saved, click Finish, and you can see the created project in the "Explorer" in the Java perspective.

4. Select the newly created project;

5. Click the "Create Java Class" button (with a C mark) in the toolbar;

6. Enter the class name in the pop-up window, and set related properties (for example, select public static void main(String[] args), click Finish, and the Java editing window will open automatically.

7. Select Preferences under the Window main menu;

8. Open the Java menu from the pop-up menu, click Classpath Variables;

9. Click New, set the path information of junit.jar in the pop-up dialog box, and click OK.

5. Experimental results

Record experimental output data and results.

Teacher's class:

 

class of course:

Admin class:

Student's class:

6. Experimental conclusion

Analyze and describe the experimental data and results, and give the experimental results and conclusions.

Note: If there is a program, the source code of the program is required, and if there is a chart, there must be a screenshot and corresponding text description and analysis

code show as below:

#include <iostream>

using namespace std;



class Teacher

{

    /*

    封装老师的相关信息

     */

public:

    void __init__(struct self,int name,int age,char admin)

    {

        self.name = name;

        self.age = age;

        self.__assets = 0;

        self.create_time = time.strftime('%Y-%m-%d %H:%M:%S');

        self.create_admin = admin;

    }



    void gain(struct self,int cost)

    {

        /*

        增加资产

        :param cost: 增加的数量

        :return:

         */

        self.__assets += cost;

    }

    void decrease(struct self,int cost)

    {



        /*

        减少资产

        :param cost: 减少的数量

        :return:

         */

        self.__assets -= cost;

    }

} ;



class Course

{

    /*

    课程相关信息

     */

public:

    void __init__(struct self,char course_name,int cost,int teacher_obj,char admin)

    {



        self.course_name = course_name;

        self.cost = cost;

        self.teacher = teacher_obj;

        self.create_time = time.strftime('%Y-%m-%d %H:%M:%S');

        self.create_admin = admin;

    }



    string have_lesson(struct self)

    {

        /*

        课程上课,自动给相关联的任课老师增加课时费

        :return: 课程内容返回给上课者

         */

        self.teacher.gain(self.cost);



        int content = random.randrange(10, 100);

        char r = time.strftime('%Y-%m-%d %H:%M:%S');

        string temp = "课程:%s;老师:%s;内容:%d;时间:%f" % (self.course_name, self.teacher, content, r);

        return temp;

    }

    void absence(self)

    {

        /*

        教学事故

        :return:

         */

        self.teacher.decrease(self.cost * 2);

    }

} ;



class Admin

{



    void __init__(struct self)

    {



        self.username = None;

        self.password = None;

    }

    int login(struct self,char user,char pwd)

    {

        /*

        管理员登陆

        :param user:

        :param pwd:

        :return:

         */

        if (self.username == user && self.password == pwd)

            return 1;

        else

            return 0;

    }



    void register(struct self,char user,char pwd)

    {

        /*

        管理员注册

        :param user:

        :param pwd:

        :return:

         */

        self.username = user;

        self.password = pwd;



        path = os.path.join(settings.BASE_ADMIN_DIR, self.username); //管理员目录

        pickle.dump(self, open(path, 'xb'));     //将管理员对象写入文件

    }

} ;



class Student

{

    /*

    学生相关信息

     */

    void __init__(struct self)

    {

        self.username = None;

        self.password = None;



        self.course_list = [];

        self.study_dict = {};

    }

    void select_course(struct self,char course_obj)

    {

        /*

        学生选课

        :param course_obj:

        :return:

         */

        self.course_list.append(course_obj) ;//将课程对象添加进课程列表

    }



    void study(self, course_obj)

    {

        /*

        学生上课

        :param course_obj:

        :return:

         */

        class_result = course_obj.have_lesson();  //获取学生上课信息



        if( course_obj in self.study_dict.keys())  //key:课程对象 value:上课信息列表,是列表格式



            self.study_dict[course_obj].append(class_result) ; //将上课信息列表添加进上一次的列表中

        else

            self.study_dict[course_obj] = [class_result, ] ;  //创建该课程对象的键值对

    }



    void login(struct self,char user,char pwd)

    {

        /*

        学生登陆

        :param user:

        :param pwd:

        :return:

         */

        if( self.username == user && self.password == pwd)

            return 1;

        else

        return 0;

    }



    void register(struct self,char user,char pwd)

    {

        /*

        学生注册

        :param user:

        :param pwd:

        :return:

         */

        self.username = user;

        self.password = pwd;



        path = os.path.join(settings.BASE_STUDENTS_DIR, self.username);  //学生目录

        pickle.dump(self, open(path, 'xb')); //将学生对象写入学生目录

    }

};

The above class is defined in C++, and the code is checked to eliminate the possible bugs as soon as possible, which can reduce the cost of solving bugs in the subsequent stage (including time cost, labor cost, etc.).

7. Experimental summary

Through this experiment, I mainly learned to use C++ related technologies to define classes. The first problem I encountered during the experiment was that I didn’t know how to implement the code for the UML diagram given in the experiment content. After thinking for a period of time and discussing with classmates to carry out the experiment.

It turns out that the educational administration system we use every day was established in this way, which is very beneficial. I have gained a different vision. In the educational administration system, every click or slide of mine corresponds to the execution of a function.

Programs don't understand people, but programs can serve people. Programs piled up such a complex system one by one. Conversely, such a large and complex system is built by programmers one by one. It's like building a house.

What needs to be improved in the experiment is mainly that the code of the project needs to be optimized. Although the class definition has been carried out, the system has not been realized, which is a pity.

From feasibility study, demand design, system design to system realization, the four experiments are closely integrated with each other, but they are different from each other and progress layer by layer. After completing the whole set, I learned how to draw and express various charts, and also had a precise grasp and understanding of the design and implementation of the system. This will be helpful for future study and life. Although I will no longer be engaged in the software engineering industry in the future, the encounters and encounters in this semester will benefit me for the rest of my life. Thanks to the teacher, and thanks to the software engineering scientists for their contributions to the software engineering system, I was deeply touched and shocked.

Source documents,
private chat, paid.

Welcome to appreciate  icon-default.png?t=MBR7https://nyzhhd.github.io/zsm

Guess you like

Origin blog.csdn.net/m0_51738372/article/details/128678963