20162314 Experiment 1: Linear structure - experiment report.
Experiment report of Besti
course:《Program Design & Data Structures》
Class: 1623
Student Name: Wang, Yixiao
Student Number:20162314
Tutor:Mr.Lou、Mr.Wang
Experiment date:2017.9.26
Secret level: Unsecretive
Experiment time:60 minutes
Major/Elective:Major
Experiment order:5
Experiment content
- Linear-list test of Java :Process, Problem.
- Linear-list application of Java :Process, Problem.
- Implement ArrayList(Pseudocode, Productcode, Testcode): Process(Analysis, Design,implement,test),Problem.
- Implement LinkedList (Pseudocode, Productcode, Testcode): Process(Analysis, Design,implement,test),Problem.
- Analyze source code of ArrayList and LinkedList:Process,Skill.
Experiment situation
Exp1 Linear-list test of Java
- It's easy to finish this experiment.
- To start with , import to form a new Linked-list to start the experiment.
- Next , use the method list.add() to ealuation.
- Then , use the for-loop to test the Linked-list.add method respectively.
- Last , export the value of three loops respectively.
Exp2 Linear-list application of Java
- To start with , set a class by using List to creat alist and blist, make the two lists' size equally.
- Next , use the sentence while-if, value alist(i) and blist(j)
- If the alist(i) > blist(j) , then merge the first place with index i+j by bList.get(j)
- Else , take the opposite.
- Then , when the length of alist > i , merge the list with index i+j by alist.get(i)
- while the length of blist > j , do the opposite
- After the loops end , return the result of merging lists.
- Last , write a test with valuing two arraylists by using list.add() and print the result.
Exp3 Implement ArrayList
- To start with , import to form a new Array-list to start the experiment.
- Next , write the index and the first element
- Next , use the method list.add to make the array list.
- Then , output and explain the fist element.
- Then , use the method list.remove to remove a number.
- Next , use the method list.contain to check whether the number is in list right now.
- Then , use the for-loop and leam.iterator to print iter.next() .
- Next , form a new String Array to print string.
- Then , use the list.clear to clear the list number.
- Last , use the method list.isEmpty to check whether the list is empty now.
Exp4 Implement LinkedList
- The whole test is made of three methods:testLinkedListAPIs(),useLinkedListAsLIFO();,useLinkedListAsFIFO();
- Then creat a class to explain this three methods.
- import a new linkedlist
- Next, use list.add to print
- Then, use stack to pop and peek.
- Next, creat a new queue
- Use the method to add and remove ,last print.
Exp5 Analyze source code of ArrayList and LinkedList
>.
Assume when we creat a Linkedlist at the start, there is only a hearder point,as the following picture.
There is a elementA1 insert ahead the header.
Now,insert a element A2 after implementing the code as the following
Entry newEntry = new Entry(A2, header, header.previous);
//Make newEntry.next point to the header, new Entry point to header.previous(A1)
newEntry.previous.next = newEntry;
newEntry.next.previous = newEntry;
Then, the picture turn to this
Code hosting
PSP5.1(Personal Software Process)
Steps | Time | percent |
---|---|---|
requirement | 45minutes | 16.7% |
design | 50minutes | 18.5% |
coding | 1.5hours | 32.2% |
test | 30minutes | 11.1% |
summary | 55minutes | 19.2% |
20162314 Experiment 1: Linear structure - experiment report.的更多相关文章
- PCA tries to preserve linear structure, MDS tries to preserve global geometry, and t-SNE tries to preserve topology (neighborhood structure)
https://colah.github.io/posts/2014-10-Visualizing-MNIST/
- 20162314 Experiment 2 - Tree
Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...
- 20162314 Experiment 4 - Graph
Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...
- 20162314 Experiment 3 - Sorting and Searching
Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The Eighth Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Eighth Week ...
- cvpr2015papers
@http://www-cs-faculty.stanford.edu/people/karpathy/cvpr2015papers/ CVPR 2015 papers (in nicer forma ...
- N-Gram
N-Gram是大词汇连续语音识别中常用的一种语言模型,对中文而言,我们称之为汉语语言模型(CLM, Chinese Language Model). 中文名 汉语语言模型 外文名 N-Gram 定 ...
- IoT experitment
Abstract: In order to solve the problems of complex experiment management, complicated teaching task ...
- 论文翻译:2021_Towards model compression for deep learning based speech enhancement
论文地址:面向基于深度学习的语音增强模型压缩 论文代码:没开源,鼓励大家去向作者要呀,作者是中国人,在语音增强领域 深耕多年 引用格式:Tan K, Wang D L. Towards model c ...
随机推荐
- 【ps】Photoshop
Photoshop Cs6 存在百度云上 另外,想用切图插件cutterman,则必须安装相匹配的ps版本
- Difference between link and @import
原文don’t use @import Using @import within a stylesheet adds one more roundtrip to the overall downloa ...
- 小白第一次使用Git随笔
想研究Git很久了,一直没有找到很好的博客或论坛,近几天工作项目任务没有那么重,就想着找几篇文章把这玩意儿给解决掉,本博客是记录读廖雪峰老师所写的<Git教程>的随笔,以便巩固学习,若想学 ...
- 内存管理与正则(re)模块
内存管理 垃圾回收机制 不能被程序访问到的数据,就称之为垃圾 也就是失去了一个能够访问到值数据的名称空间,导致在内存中无作为 引用计数:是内存管理的原理 引用计数是用来记录值的内存地址被记录的次数 每 ...
- Linux内核模块Makefile学习
在<Linux设备驱动程序>一书中读到的内核模块编译Makefile,不是非常理解,在查询很多资料后,在这里做个总结. 书中Makefile代码: ifneq ($(KERNELRELEA ...
- 20155229 《信息安全系统设计基础》 Mypwd实现
Mypwd 内容 1 学习pwd命令 2 研究pwd实现需要的系统调用(man -k; grep),写出伪代码 3 实现mypwd 4 测试mypwd 学习pwd命令 通过man pwd查看 pwd命 ...
- Maven Java项目添加Scala语言支持
为了在一个普通的使用Maven构建的Java项目中,增加对Scala语言的支持.使得其能够同时编译Java和Scala语言的文件.其实很简单的一件事情,只需要在pom.xml文件中的build部分中的 ...
- mysql是否区分大小写
1.是否区分 库名.表名.列名.别名 的大小写? ------------------------------------------------------------------ [ Linux] ...
- linux java jdk环境变量设置之后,依旧提示 No such file or directory
今天又默默的在linux下安装java 明明是很简单的事情,在~/.bashrc中添加如下内容: export JAVA_HOME=/home/ubuntu/jdkexport CLASSPATH=. ...
- 【LG3722】[HNOI2017]影魔
[LG3722][HNOI2017]影魔 题面 洛谷 题解 先使用单调栈求出\(i\)左边第一个比\(i\)大的位置\(lp_i\),和右边第一个比\(i\)大的位置\(rp_i\). 考虑\(i\) ...