C++ Implementation of Online Final Questions of a University in Shanghai - Nucleic Acid Detection System

C++ Implementation of Online Final Questions of a University in Shanghai - Nucleic Acid Detection System

Note: This blog is only for learning, communication and recording learning content, sharing some of my own insights and ideas, if there is anything inappropriate, please let me know.

Question content

insert image description here

Assessment requirements

insert image description here

Project file address

Open source on github
https://github.com/hudiscount/Nucleic-Acid-detection-system

Project description document README.md (this file is also available in the source code)

Nucleic acid detection system

Main function realization

(a) Queue registration. (Document)
(b) Detection of nucleic acid. (Document)
(1) Queue registration
(2) Detection of nucleic acid
(3) Check the queue situation
(4) Level test results (
5) Various personnel inquiries
(6) Personal query
(7) Construct all staff information table
(8) Display all staff information table

Functional test and detailed description

Some notes:

1. After running, please input strictly according to the label before the option, and do not enter strange input, so as to avoid unknown errors in the program.
2. Be sure to enter the 7 options first to construct a large table of all staff information.
3. The personnel code in the designed nucleic acid detection system has a fixed range.
The requirements of the topic are as follows: the personnel code is an 8-digit number (xxxyyyyz), where xxx represents the building number (000 to 999); yyyy represents the room number, for example: 0801, 1801, etc.; z represents the serial number of the personnel in a room (1~ 9).
But considering the actual situation, the number of buildings is not that many, the floors are not that high, and there are not so many people in each household. In fact, the first three building numbers range from (001 to 060), that is, from No. 1 Building to Building 60. The first two digits of the following four digits represent the floor number, ranging from 01 to 12, that is, twelve floors. The next two digits indicate the number of rooms on a certain floor, and the range here is 01 to 04. The last digit represents the number of people in the room, and the specified range is 1 to 4. Such eight digits represent a person's personnel code.
4. If the nucleic acid test is a single test, the first digit of the assigned single test tube number is 1, and the last four digits range from 0000 to 9999. The serial number assigned according to the detection sequence will be invalid if it overflows. If the nucleic acid test is a mixed test, the first digit of the mixed test tube number assigned is 0, and the last four digits are 0000 to 9999. Ten people have the same nucleic acid test tube number. The same overflow is invalid.
5. In addition to the nucleic acid detection tube number (string type), the private member variables of the personnel information class Person_Information also have state 1 s1 and state 2 s2. s1 includes three states: Undetected, In_Line, and Wait_for_upload_result. These three states are progressive in sequence, and the priority is increased in sequence. That is, if no operation is performed on a person, the first state s1 is Undetected by default. If he queues later, the status is updated to In_Line, and if the nucleic acid is detected again, it is updated to Wait_for_upload_result. If the queuing program is performed later, the previous state will be overwritten and become In_Line, and the other states of s1 will be covered in the same way.
For state s2, there are five states including Negative, Diagnosis, Suspicious, Contact, and Sub_Contact. For the two cases of diagnosis and negative, the priority is higher than that of other states, which can cover the other three states, and the two states can cover each other, which is also reasonable. If a person is diagnosed, all his previous status can be overturned, and if the nucleic acid test is negative, then his confirmed status can also be overwritten. For the remaining three states, Suspicous can cover Contact, Negative, Sub_Contact, Contact can cover Negative, Sub_Contact, and Sub_Contact can only cover Negative. These are the priority coverage relations considered according to the actual situation.

Operation guide:

1. Open and run the program first or open the corresponding .exe file to display the nucleic acid detection system.
2. Enter the number 7 first, and press enter. Build a large information table for all employees.
3. Then enter a and press enter. Then enter b and press enter.
4. At this time, you can press 8 again to view the status of the large list of all employees. You will find that the first column is the personnel code, arranged in a certain order, and the second column is the nucleic acid test tube number. If the person has not queued up for testing, then this At this time, his second state is the initial state null, which means that no nucleic acid tube number is assigned to him. The third and fourth columns represent the status of the personnel. For the classification of the status and the coverage relationship between each other, please refer to Note 5. 5. At this time, you
can see what the project reads from the file. data. Open line_up.in, and at this time, 18 queues for mixed management and 19 queues for single management are read. Open the nuclear_acid_test.in file again, and found that 11 people were tested for mixed nucleic acid testing, and 12 people were tested for single-tube nucleic acid. Note that the number of people doing the mixed test at this time is not an integral multiple of 10, but the corresponding nucleic acid test will still be made, and the status will be changed to Wait_for_upload_result. If there are still people queuing up later, for example, 9 more people will queue up, and these 9 people will be left with the card. 1 person still has the same mixed test tube number, which is realized through the private member variables in the nucleic acid detection system class. If the number of mixed inspection tubes is not full, the registration result operation is not recommended. The program will not register the status of these people, and only 10 people in the subsequent queue can be registered. If it is really necessary to change the registration in this state, it is recommended to register through the personnel code, and you can choose option c.
6. Verify whether the registration is successful.
If the input test tube number is illegal, it will not be registered. Only by entering the correct test tube number can it be found and registered accordingly.
Registration of mixed tube diagnosis:
select 4, press enter;
input 00000, press enter, that is the number of the first mixed test tube generated;
Enter Diagnosis and press enter to change the corresponding status of these mixed personnel codes to Suspicious.
Select 5 and press enter;
then select 3 and press enter to display the information of the people in Suspicious status.
Select 4, press enter; input 10004, press enter, that is ,
register the fifth single inspection; his personnel code is not difficult to see from the file is 05801012,
input Diagnosis, press enter;
select 5, press enter;
Select 2, press enter, and the information of the person in the Diagnosis state is displayed.
Select 5 and press enter;
select 4 again and press enter to display the information of the person in the Contact state.
Select 5 and press enter;
select 5 again and press enter to display the information of the person in the Sub_Contact state.
The analysis shows that the results of the operations are in line with the requirements of the topic, and the program has good robustness. It's just that there are no prompts for abnormal input, but if the input does not meet the specifications, it will not affect the program.

Project Course Assessment Report

Attached to the project source code (only the relevant part of this question is given)

Guess you like

Origin blog.csdn.net/Hudiscount/article/details/126390636