LAB 1-2 Individual programing work

LinQF39 2022-10-21 21:02:26

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.

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:


 
  1. #include <stdio.h>

  2. int main(){

  3.    int i=1;

  4.    double j=0;

  5.    long f;

  6.    switch(i){

  7.        case 0:

  8.            break;

  9.        case 1:

  10.            break;

  11.        case 2:

  12.            break;

  13.        default:

  14.            break;

  15.   }

  16.    switch(i){

  17.        case 0:

  18.            break;

  19.        case 1:

  20.            break;

  21.        default:

  22.            break;

  23.   }

  24.    if(i<0){

  25.        if(i<-1){}

  26.        else{}

  27.   }

  28.    else if(i>0){

  29.        if (i>2){}

  30.        else if (i==2) {}

  31.        else if (i>1) {}

  32.        else {}

  33.   }

  34.    else{

  35.        if(j!=0){}

  36.        else{}

  37.   }

  38.    return 0;

  39. }

Format Requirement

 Output format: The code above is used as an example


 
  1. total num: 35

  2. switch num: 2

  3. case num: 3 2

  4. if-else num: 2

  5. 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

 

...全文
1592 59 打赏 收藏 转发到动态 举报
写回复
用AI写文章
0人已提交
完成率0%
暂无数据
59 条回复
切换为时间正序
请发表友善的回复…
发表回复
Kachn_ 2022-12-05
  • 打赏
  • 举报
回复

http://t.csdn.cn/0YBKU
FZU:832001317 MU:20122543

832002220赵云龙 2022-12-04
  • 打赏
  • 举报
回复

https://bbs.csdn.net/topics/608790020
FZU:832002220 MU:20123531

丽丽 2022-11-19
  • 打赏
  • 举报
回复

https://bbs.csdn.net/topics/608837177
FZU:832001218 MU:20124643

理塘丁真 2022-11-19
  • 打赏
  • 举报
回复

EE308_Lab1-2 FZU:832001207 MU:20124546
https://bbs.csdn.net/topics/608837372

ClutchMaster 2022-11-15
  • 打赏
  • 举报
回复

EE308_Lab1-2 FZU:832002201 MU:20123825
https://bbs.csdn.net/topics/608790063

  • 打赏
  • 举报
回复

EE308_Lab1_2 FZU ID:832001221 MU ID:20123957
Blog Link:: https://bbs.csdn.net/topics/608837175?spm=1001.2014.3001.6377

Knightmare212 2022-11-09
  • 打赏
  • 举报
回复

Lab 1-2 FZU ID:832001101 MU ID:20122225
BLOG LINK:https://bbs.csdn.net/topics/608837939

OuRan偶然 2022-11-09
  • 打赏
  • 举报
回复
Blue_Ice03 2022-11-06
  • 打赏
  • 举报
回复
m0_57843239 2022-11-05
  • 打赏
  • 举报
回复

Lab1-2 FZU ID:832001119 MU ID:20124279
Blog link:https://bbs.csdn.net/topics/608814278

  • 打赏
  • 举报
回复

Lab1-2 FZU ID:83200124 MU ID:20124732
Blog link:https://bbs.csdn.net/topics/608837745

YUZUq 2022-11-05
  • 打赏
  • 举报
回复
weixin_54657016 2022-11-05
  • 打赏
  • 举报
回复
非布司她482 2022-11-05
  • 打赏
  • 举报
回复
XIiww 2022-11-05
  • 打赏
  • 举报
回复
hfhfhfhfhf5 2022-11-04
  • 打赏
  • 举报
回复
Adrian不爱卷 2022-11-04
  • 打赏
  • 举报
回复
小火柴x_x 2022-11-04
  • 打赏
  • 举报
回复
Friedrich Ludwig 2022-11-04
  • 打赏
  • 举报
回复
qq_60095079 2022-11-04
  • 打赏
  • 举报
回复
加载更多回复(39)
内容概要:本文系统研究了开关频率大于谐振频率(fs>fr)工况下,移相混合控制LLC谐振变换器在低压增益区域的工作特性,深入分析其在变频与移相结合控制模式下的调制机理、工作模态划分及损耗分布规律。通过Simulink平台构建高保真仿真模型,对变换器在不同负载和输入条件下的电压增益、转换效率、关键器件电压电流应力等性能指标进行了全面仿真验证,重点探讨了其在低增益区间的软开关实现能力与效率优化潜力,旨在提升LLC变换器在宽范围输入输出应用中的动态响应与能源转换效率。; 适合人群:从事电力电子变换器设计、高频电源开发及相关领域的高校研究生、科研院所研究人员及企业研发工程师,要求具备扎实的电路理论基础、电力电子技术知识以及一定的Simulink仿真能力。; 使用场景及目标:①深入理解LLC谐振变换器在fs>fr条件下采用移相混合控制的内在工作机理与模态转换过程;②掌握利用Simulink搭建复杂谐振变换器精确仿真模型的方法与技巧;③分析并优化低压增益区的增益特性与损耗构成,为设计高效率、高功率密度的软开关电源提供理论依据和数据支持; 阅读建议:建议读者结合文中所述仿真模型,亲自复现仿真过程,重点观察不同控制参数(如移相比、开关频率)对电压增益曲线和关键波形的影响,并对比传统变频控制策略,深入探究混合控制在拓宽调压范围、提升轻载效率方面的优势,从而深化对现代高效谐振电源设计的理解。
内容概要:本文提出了一种基于粒子群优化算法(PSO)的配电网光伏储能双层优化配置模型,以IEEE33节点系统为标准算例,实现光伏发电单元与储能系统的协同选址与定容优化。该模型采用双层架构设计,上层以投资成本、运行经济性及网络损耗最小为目标优化设备配置方案,下层通过潮流计算评估系统在不同负荷场景下的运行性能,综合考虑电压稳定性、供电可靠性及可再生能源消纳能力,最终通过Matlab编程实现完整求解流程,为高渗透率分布式电源接入背景下的配电网规划提供了有效的技术支撑。; 适合人群:具备电力系统分析基础和Matlab编程能力的研究生、高校科研人员及从事新能源并网、智能配电网规划与优化的工程技术人员。; 使用场景及目标:①研究含高比例光伏接入的配电网规划与运行协同优化问题;②掌握双层优化建模方法与粒子群算法在复杂电力系统问题中的应用技巧;③为实际工程中分布式光伏与储能系统的科学选址与容量配置提供理论依据与仿真验证平台。; 阅读建议:建议读者结合Matlab代码深入理解双层迭代求解机制,重点关注算法收敛性分析、参数敏感性测试,并可通过更换初始种群、调整权重因子或引入其他标准测试系统(如IEEE69节点)进行对比实验,进一步验证所提模型的普适性与鲁棒性。

285

社区成员

发帖
与我相关
我的任务
社区描述
福州大学 梅努斯国际工程学院 软件工程(2022秋) 教学
软件工程 高校
社区管理员
  • LinQF39
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧