LAB 2 Individual programing work (EE308 IEC MU 2021 Fall)

REP1USONE REP1USONE 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

Task

1.To achieve a program function, it can extract keywords of different levels from the C or C++ code files that are read in.

2. Write a blog to record your work content and process.

DDL

2021.9.24 00:00am

Work Procedure

1.Create a GitHub repository for the job.

2.Write the program and commit actively.

3.Iteratively update and optimize the code.

4.Complete your work and write a blog.

Program Requirements

1. Basic requirement: output "keyword" statistics

2. Advanced requirement: output the number of "switch case" structures, and output the number of "case" corresponding to each group

3. Uplifting requirement: output the number of "if else" structures

4. Ultimate requirement: output the number of "if, else if, else" structures

Before completing the more difficult requirements, you need to complete the Lower requirements.

Coding Requirements

1.Use any of C++, Java, Python to complete the work.

2.Develop appropriate code specifications and conduct tests.

3.Use Git for version control.

Blog Requirements

1.Give the PSP form for this work.

2.Description of problem-solving ideas. This is the process of how to think and how to find information after getting the title at the beginning.

3.Design and implementation process. The design includes how the code is organized and the flow chart of the key functions.

4.Code description. Show the key code of the project and explain the idea.

5.Unit test screenshots and description.

6.Unit test coverage optimization and performance testing, performance optimization screenshots and descriptions.

7.Summarize this assignment.

Prerequisites

1. github first use

In order to ensure that your code can help more people, and can be effectively managed and open source shared, please learn how to use GitHub first:

(1).Download Git.

(2).Learn basic Git commands.

(3).Create a repository on GitHub and upload this assignment, complete the requirements, and make at least 10 commits.

2. Code specification development

In order for other colleagues to read your code easily, please formulate your own code specifications and require that they not deviate from the mainstream code specifications: please refer to alibaba-java-style-guide/Google-C++-style-guide/Python PEP8, Develop your programming specifications from the following perspectives and write them into Markdown files.

- indentation

- Variable naming

- Maximum number of characters per line

- Maximum number of function lines

- Function and class naming

- constant

- Blank line rule

- Annotation rules

- Space before and after operator

- Other rules

SAMPLE

c language test file:

#include <stdio.h>
int main(){
    int i=1;
    double j=0;
    long f;
    switch(i){
        case 0:
            break;
        case 1:
            break;
        case 2:
            break;
        default:
            break;
    }
    switch(i){
        case 0:
            break;
        case 1:
            break;
        default:
            break;
    }
    if(i<0){
        if(i<-1){}
        else{}
    }
    else if(i>0){
        if (i>2){}
        else if (i==2) {}
        else if (i>1) {}
        else {}
    }
    else{
        if(j!=0){}
        else{}
    }
    return 0;
}

Format Requirement

 Output format: The code above is used as an example

total num: 35
switch num: 2
case num: 3 2
if-else num: 2
if-elseif-else num: 2

Tips:

1. TA can’t notice all students. If your blog can impress TA, you can get higher remark.

2. If you have some question, you should ask directly in the QQ group and you’d better not make a private chat with TAs or tutor.

3. Please issue your homework in the section of assignment on CSDN.

4. The Link of each assignment you would accomplish must be submit to Moodle, or you will lose the score of the assignment.

5. Each assignment submitted to CSDN must be completed in English.

  • A total of 32 keywords are defined:

autobreakcasecharconstcontinuedefaultdo
doubleelseenumexternfloatforgotoif
intlongregisterreturnshortsignedsizeofstatic
structswitchtypedefunionunsignedvoidvolatilewhile
...全文

相关推荐

IEC61850-Introduction---Legacy.143561059-RT-LAB帮助文档.pdf

RT-LAB帮助文档

小青蛙电气

【信息科学与工程学】【物理/化学科学和工程技术】知识体系073——电学基础04

​。

flyair_China

【信息科学与工程学】【物理/化学科学和工程技术】知识体系081 磁学02

由 τ = 1/f_0 * exp(E_b/(k_B T_B)), 解得 T_B = E_b / (k_B ln(f_0 τ)) = 5e-21 / (1.38e-23 * ln(1e9 * 3600)) ≈ 363 K / (ln(3.6e12)) ≈ 363 K / 28.8 ≈ 580 K (307°C)。若 N_s=100, A=1e-6 m², l=0.01 m, 则 k ≈ 8 * 1e4 * 100 * 1e-6 * 4πe-7 * 1e5/0.01 ≈ 10 V/T。即 10 μV/nT。

flyair_China

Lab-SCADA IEC 104 Protocol Simulator:IEC 60870-5-104 主从模拟器(Linux + Windows GUI)-开源

Lab-SCADA IEC104 主从模拟器实现 IEC 60870-5-104 通信协议的主(控制)站和从(受控)站角色。 IEC 104 Master Simulator 包括: - iec104msd - Linux 操作系统的服务器守护程序,实现 IEC 60870-5-104 主站协议的核心通信服务 - iec104m_ui - Linux 操作系统的命令行 UI 前端,用于与iec104msd Linux 守护进程 - ls104msgui.exe - 用于与 iec104msd Linux 守护进程 IEC 104 Slave Simulator 通信的 Windows GUI 控制应用程序包括: - iec104sld - Linux 操作系统的服务器守护程序应用程序,实现 IEC 60870-5-100 的核心通信服务从站协议-iec104s-Linux OS的命令行UI前端,用于与iec104sld Linux守护程序进行通信-ls104slgui.exe-Windows GUI控件应用程序,用于与iec104sld Linux守护程序进行通信

没名字的女人

IEC61850-Introduction.143758955-RT-LAB帮助文档.pdf

RT-LAB帮助文档

小青蛙电气
评论
收藏 已收藏
分享
返回顶部