EE308 LAB1_2

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

EE308 LAB1_2 2022

Catalogue

  • EE308 LAB1_2 2022
  • PSP form
  • Basic Idea
  • Design & Implement
  • Code Explanation
  • Result
  • Summary

The Link Your Class https://bbs.csdn.net/forums/MUEE308FZU202201
The Link of Requirement of This Assignment https://bbs.csdn.net/topics/608734907
The Aim of This Assignment Keywords extraction and counting
MU STU ID and FZU STU ID20124066 & 832002123

MY GITHUB:https://github.com/taohhoat/EE308_LAB12

PSP form

Personal Software Process StagesEstimated Time/minutesCompleted Time/minutes
Planning2530
Estimate2530
Development5040
Analysis3030
Design Spec3020
Design Review1010
Coding Standard1510
Design1010
Coding7085
Code Review Planning2020
Test1030
Reporting6570
Test Report1530
Size Measurement1520
Postmortem & Process Improvement4040
total430475

Basic Idea

I use c++ to solve the problem.
I know the most different part in the project is that we need frequently use String and char [] to solve the problem.
First, i review the information about Import a directory usage and how to deal with the content in a ".txt" line by line.
Second, i clearly draw a picture which shows the connection between 4 steps.
I use draw.io to picture a link map.

在这里插入图片描述

Design & Implement

在这里插入图片描述


step 1 and 2:
It is easy to think that we can just use a String array to carry all the keywords, and order to find the words same as the word in the array;
The same way to find the "switch ".

step 3 and 4:
It is hard to discuss because "if else " and "if else if " have same part. So we can use a double loops. First loop is to judge whether " if else if " is finding. If is found, no more operation. Else judge the another "else ".

Code Explanation

在这里插入图片描述


This is where I started using the stack structure. A stack is a data structure in which items are arranged in order, and items can only be inserted and deleted at one end (called the top of the stack). When I find cases, I will sum them up and calculate the number of cases. When I traverse to default, I will end the sum up. Or when I encounter the next switch, I will add the switch and re-stack the number

在这里插入图片描述

when the second one finds the else and then finds the if, if follows, it will print the Boolean to false. I check to see if there is an if or else if form stored at the top of the stack, and count if there is, otherwise it doesn't work

Result

在这里插入图片描述


在这里插入图片描述


在这里插入图片描述


在这里插入图片描述

Performance optimization:
stack using is not a better way than loop, it cause more time because of it's mechanism .Then i may use two loop to replace the process of dealing with the step3 and 4.

Summary

It is the first time i use Git. I know the advantages of Git well which allow me to change and optimize my code better in the next time. And i use github to save my code, it is better to see the change in my process.

...全文

相关推荐

EE-308 LAB4 final version.7z

这是本次实验的压缩包

晨起剪桃花

【工业自动化】欧姆龙PLC产品线与编程软件应用:从选型架构到调试排错的全流程技术指南

内容概要:本文《欧姆龙PLC与编程软件完全手册》系统介绍了欧姆龙PLC的产品架构、软件体系、通信协议、选型策略及编程调试技巧。重点区分了两大技术平台:基于CX-Programmer的传统C系列(CP/CJ/CS)与基于Sysmac Studio的新一代Sysmac平台(NJ/NX/NY),强调二者在软件生态、寻址方式和通信架构上的根本差异。手册详细对比了各系列PLC的性能参数,并提供与西门子产品的功能对标,帮助用户快速定位。深入讲解了编程操作中的关键问题,如任务结构设计、间接寻址、FB封装陷阱、在线调试五件套等,特别指出“FB使能关闭时状态不初始化”等易出错点。最后汇总了选型路径与现场避坑清单,极具实战指导价值。; 适合人群:具备一定工业自动化基础,从事PLC编程、设备调试、系统集成的研发工程师和技术人员,尤其是从西门子平台转向欧姆龙或参与新项目选型的1-5年经验从业者。; 使用场景及目标:① 新项目选型时判断应选用C系列还是Sysmac平台;② 编程调试过程中掌握高效操作技巧与常见问题排查方法;③ 实现跨平台迁移、系统升级或接手他人项目时规避架构与逻辑陷阱;④ 提升对欧姆龙PLC任务机制、间接寻址、FB设计等高级功能的理解与应用能力。; 阅读建议:本手册理论结合实践,建议按“先架构后操作”的顺序阅读,重点章节需结合实际工程反复演练。特别是FB设计规范、任务切换处理、强制操作收尾流程等内容,应在仿真环境中验证后再应用于现场。注意版本匹配问题,操作前确认所用软件与控制器固件版本兼容。

莫问西东LJ

CISP-CSE注册云安全工程师备考资源包

CISP-CSE注册云安全工程师备考资源包

嫑甭歪孬

科技中介服务机构如何通过AI技术降低技术评估与匹配服务的操作门槛?.docx

科技中介服务机构如何通过AI技术降低技术评估与匹配服务的操作门槛?

BIZKEEN

国央企创新负责人如何借助平台实现创新资源的高效配置与项目落地?.docx

国央企创新负责人如何借助平台实现创新资源的高效配置与项目落地?

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