双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

EE308_LAB1-2

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

EE308_LAB1-2

ways of solving a problem

First of all, the general reading topic is divided into two parts. The first part is to identify the statistical keywords, and the second part is to identify the statistical code structure.
The first part is the first part. For the extraction of code keywords and statistics I think usinghash tables will be very easy to complete this part of the work.The specific idea is to retrieve the keywords in the hash table, and then add the counter if present. 1. Add a new key value pair if not present.
The second part is the structure identification specifically divided into three structures of the identification.
However, the identification idea of several structures is roughly the same.
Ststack the keywords and "{" and "}". Clear when the "}" heap goes into the stack, clear to the previous "{", and heap the cleared portion into the buffer.
The structure is analyzed into multi-level conditions, and the subsequent conditions will start to verify when the preconditions are completed.

1.switch case

Here the switch case structure is set to a two-level condition, with a precondition of switch stacking into the stack..
Turn on the switch when the precondition is reached, and count when the case enters the stack. And turn off the switch when the switch enters the buffer.
prefix condition : switch
decide condition : case

2.if else

The structure takes if as a precondition and counts and switches off when the else enters the stack.
prefix condition : if
decide condition : else

3.if else if else

This part will switch to the second structure, which I analyze as a three-level condition.
first condition : if else
second condition : else if
third condition :else
The first condition will use the judgment of the ifelse structure. Switch 1 will open as the counter of the ifelse increases.
The second switch tube will be open in the else if {} in the buffer.
The decision criteria will verify that the next entry keyword is else when the second switch is on.

The above is through the analysis after reading the problem.

the flow chart of the key functions

请添加图片描述

Code descriptionHashMap<String, Integer> map = new HashMap<String,Integer>();

    for (String li : lists) { 
        if(li.length()<=1) continue;
        if(!map.containsKey(li)) {//Detects if it is already in the table
            map.put(li, 1);
        }else {
            Integer count = map.get(li);
            map.put(li, ++count);
        }
    }



//type1 switch case
                //Open the switch after switch enters the stack
                if(i==0) {
                  sw1=true;
                  sw++;
                }
                if(sw1==true&&i==1) ca++;//Start the case counting after the switch is on
                //Turn off the switch after "}" enters the stack and return to the zero counter
                if(sw1==true&&i==5) {
                    System.out.println("number of switch"+sw+" case = "+ca);
                    ca=0;
                    sw1=false;
                }



//type2 if else
                //The if else only has an else decision condition, so it does not set up a switch
                if(i==3) type2++;


//type3 if, else if, else
                //Determine the precondition and complete the precondition and close the switch
                if(sw2==true) {
                    if(i==3) type3++;
                    sw2=false;
                }


if(li.equals(table[5])) {
            //type3 if, else if, else
             List<String> buffer = new ArrayList<String>();//Create the buffer judgment preconditions
            sw2=true;
            //Eliminate after the "}" goes into the stack 
            while(true) { 
                if(!st.empty()&&!st.peek().equals(table[4])) {
                    buffer.add(st.peek());
                    st.pop();
                }else break;
            }
            if(!st.empty()) {
                buffer.add(st.peek());
                st.pop();
            }
            while(true) { 
                if(!st.empty()&&!st.peek().equals(table[4])) {
                    buffer.add(st.peek());
                    st.pop();
                }else break;
            }
            //Judge the preconditions, the condition of the switch on
            if(buffer.size()==4) {
            for(int i=0;i<buffer.size();i++) {
                if(!buffer.get(i).equals(type3buffer[i])) {
                    sw2=false;
                    break;
                }
            }
            }else sw2=false;
        }
      
     }

psp

psptime
Planning10
Estimate60
Development50
Analysis30
Design Spec20
Design Review20
Coding Standard10
Design20
Coding20
Code Review40
Test10
Reporting50
Test Report30
Size Measurement10
Postmortem & Process Improvement Plan10
390
The Link Your Class
The Link of Requirement of This Assignmenthttps://github.com/if-ish/EE308FZ-Lab1-2-Individual-programing-work
The Aim of This AssignmentKeyword statistics and structure identification
MU STU ID and FZU STU ID<20124635_832002210>
...全文

相关推荐

EE-308 LAB4 final version.7z

这是本次实验的压缩包

晨起剪桃花

研发流程后端开发工具,提示功能开发效率

后端开发工具

阳光不锈@

Screenshot_2026-11-03-16-23-09-34.jpg

Screenshot_2026-11-03-16-23-09-34.jpg

2601_97129411

机器人具有扰动抑制功能的有限时间基于方位角的领航者-跟随者编队控制(Matlab代码实现)

内容概要:本文档标题为《Plecs全桥LLC谐振变换器仿真模型.txt》,但实际内容并未涉及该主题的具体技术细节或仿真建模过程。相反,文档实质是一份由科研服务团队发布的跨学科资源目录,集中展示了大量基于Matlab、Simulink、Python、PSCAD等平台实现的科研项目与算法开发案例,涵盖电力系统、无人机路径规划、微电网优化、状态估计、信号处理、车间调度、图像处理、通信技术、雷达追踪、智能优化算法等多个工程技术领域。每个条目以“【】”标注研究主题,并注明“Matlab代码实现”“Python代码实现”等形式,表明其为可提供技术支持与代码资源的服务项目。文档末尾频繁出现“完整资源下载:公众号——荔枝科研社”及百度网盘链接,明确体现出其作为科研辅助服务推广与引流工具的功能属性。; 适合人群:面向电气工程、自动化、控制科学与工程、计算机科学、智能制造、新能源、航空航天、通信工程及相关交叉学科的研究生、高校教师、科研人员及企业研发工程师。; 使用场景及目标:①为科研人员提供课题选题、技术路线设计与算法实现的参考范例;②辅助学生或研究人员完成课程设计、毕业论文、项目仿真与算法复现任务;③作为第三方技术服务团队的能力展示目录,便于潜在客户快速了解其在多领域提供的定制化仿真与算法开发服务范围。; 阅读建议:此文档并非传统意义上的学术论文或技术教程,而是一份高度碎片化、广告性质浓厚的资源索引清单。读者应忽略其误导性的文件名,将其视为一个综合性科研技术服务目录,重点关注自身研究方向相关的条目,并通过文末提供的公众号或网盘链接进一步获取具体代码与资料。同时,需注意甄别资源的技术质量、原创性与适用性,避免盲目依赖外部服务。

荔枝科研社

科技中介服务机构如何打造高效、可复制的技术交易服务流程?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN
评论
收藏 已收藏
分享
返回顶部