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

REP1USONE 助教 2021-09-17 16:53:40

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
...全文
2253 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
资源下载链接为: https://pan.quark.cn/s/f1ead55c4354 以下标题“H5页面模板源码,很不错的例子”暗示了我们讨论的主题是关于HTML5页面模板的源代码。HTML5是现代网页开发的核心技术,它提供了丰富的功能和元素,让开发者能够构建出更具交互性、动态性和响应式的网页。“很不错的例子”表明这些源码不仅具有实用性,还具备一定的教学意义,既可以作为项目开发的直接素材,也能供学习参考。 在描述“H5页面模板源码,非常酷炫的HTML5模板,可以直接使用,也可以参考学习”中,“非常酷炫”意味着这些模板可能融合了诸多高级特性,例如动画效果、媒体元素的运用以及响应式设计等,这些都是HTML5技术的优势所在。可以直接使用表明用户无需从零开始编写代码,能迅速搭建出吸引人的网页。同时,这些模板也适合学习,用户通过查看源代码可以了解特定设计和功能的实现方式,从而提升自身的HTML5开发能力。 标签“H5 手机网页 H5源代码 手机html”进一步明确了主题。“H5”是HTML5的简称,“手机网页”和“手机html”则强调这些模板是针对移动设备优化的。在如今移动优先的时代,适应各种屏幕尺寸和触摸操作的网页设计极为重要。这表明这些源码很可能是响应式的,能够根据设备自动调整布局,以适配手机、平板电脑等多种设备。 从“压缩包文件的文件名称列表”来看,虽然无法直接从文件名得知具体源码内容,但可以推测这些文件可能包含多种HTML5模板示例。“不错的样子.txt”可能是一个介绍或说明文件,对模板进行简要描述或提供使用指南。而“1-30”这样的命名方式可能意味着有30个不同的模板实例,每个模板对应一个独立文件,涵盖多种设计风格和功能,为学习和实践提供了全面的平台。 总的来说,这个资源集合为HTML5开发者或初学者提供了一套实用且酷炫的移动网页模板源代码。这些模板既可以直接应用于项目

183

社区成员

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

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