LAB 2 Individual programing work
The Link Your Class | |
The Link of Requirement of This Assignment | https://bbs.csdn.net/topics/600798588 |
The Aim of This Assignment | Knowing how to use git/github,and write a program to count the keywords in specific code. |
MU STU ID and FZU STU ID |
19105789_831901108 |
目录
LAB 2 Individual programing work
Unit test screenshots and description
PSP TABLE
Personal Software Process Stages | Estimated time(min) | Time(min) |
---|---|---|
Planning | 30 | 35 |
Estimate | 20 | 20 |
Development | 40 | 45 |
Analysis | 70 | 80 |
Design Spec | -- | -- |
Design Review | 40 | 40 |
Coding Standard | 50 | 50 |
Design | 200 | 230 |
Coding | 350 | 450 |
Code Review | 300 | 480 |
Test | 200 | 300 |
Reporting | 120 | 120 |
Test Report | 50 | 55 |
Size Measurement | 20 | 20 |
Postmortem&Process Improvement | 40 | 50 |
total | 1530 | 1975 |
The idea of solving problems
-
Choosing language: Since we systematically learned C++ in the second semester of sophomore year, which is a programming language I am most familiar with, I chose C++ for this programming experiment. I realized at the beginning that I could probably write simpler code in Python, but it's been a long time since I learned Python. In this programming assignment, I chose to use different functions to complete different steps, and also learned how to write code by studying Runoob search.( https://www.runoob.com/cplusplus/cpp-files-streams.html)
-
Mind map:
code explaination
- To open the file:
- Define keywords and count keywords in the file:
- Look for "switch" and "case" in the file, and define an integer to count how many times the keyword appears:
- Look for "else" "if" "else if" in the file, and count the number of loops through iteration:、
Unit test screenshots and description
- My codes in github:https://github.com/Yu-yUyuu/EE308_LAB2/blob/main/LAB2.cpp
- The result of sample:
- My result:
summary
Complete the programming assignments for the first time, also learned to use making for the first time, process is full of challenging, I encountered many difficulties, it took me quite a lot of time to consider purpose solution and implementation approach, sometimes think about the train of thought, but I don't know how to use the code to express their own ideas, but to finish the homework brings me a sense of accomplishment, I still need to work hard to improve my programming skills. The first assignment was difficult, but it also made me realize that I need to exercise my ability more. I will work harder so that I can finish the assignment more skillfully in the future.