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

  1. Linear-list test of Java :Process, Problem.
  1. Linear-list application of Java :Process, Problem.
  1. Implement ArrayList(Pseudocode, Productcode, Testcode): Process(Analysis, Design,implement,test),Problem.
  1. Implement LinkedList (Pseudocode, Productcode, Testcode): Process(Analysis, Design,implement,test),Problem.
  1. 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.的更多相关文章

  1. 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/

  2. 20162314 Experiment 2 - Tree

    Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...

  3. 20162314 Experiment 4 - Graph

    Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...

  4. 20162314 Experiment 3 - Sorting and Searching

    Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...

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

  6. cvpr2015papers

    @http://www-cs-faculty.stanford.edu/people/karpathy/cvpr2015papers/ CVPR 2015 papers (in nicer forma ...

  7. N-Gram

    N-Gram是大词汇连续语音识别中常用的一种语言模型,对中文而言,我们称之为汉语语言模型(CLM, Chinese Language Model).   中文名 汉语语言模型 外文名 N-Gram 定 ...

  8. IoT experitment

    Abstract: In order to solve the problems of complex experiment management, complicated teaching task ...

  9. 论文翻译:2021_Towards model compression for deep learning based speech enhancement

    论文地址:面向基于深度学习的语音增强模型压缩 论文代码:没开源,鼓励大家去向作者要呀,作者是中国人,在语音增强领域 深耕多年 引用格式:Tan K, Wang D L. Towards model c ...

随机推荐

  1. java spring boot项目部署-上

    1.编写sh脚本,便于服务器上管理工程: #!/bin/bash source /etc/profile PROG_NAME=$ ACTION=$ usage() { echo "Usage ...

  2. 关于java8(Stream)的一些用法

    如果要处理int[] 转换成 List<Integer>这种形式的,可以用下面这个方法: List<Integer> orgIds = Arrays.stream(reqVo. ...

  3. PHPCMS v9 手机端栏目绑定模板

    phpcms的手机端,模块是有了,但是有些地方用的还不是很舒服,其中移动端栏目无法绑定模板就不是很方便.如图,所有的栏目绑定的模板是固定的. 这次咱们就来处理下,移动端如何设置相应的模板.这里说是设置 ...

  4. golang实现简单的栈

    栈的ADT 数据 栈的数据对象集合为{a1,a2,a3...an},具有相同数据类型,有唯一前驱后续 操作 InitStack() *Stack //初始化操作,创建一个空栈 Clear() //清空 ...

  5. 链接SQLServer数据库 导出csv文件

    依赖::::<dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>ms ...

  6. struts2第二天——数据操作

    先介绍一下大致内容: 大致内容: 结果页面配置 action获取表单提交数据 提供获取表单数据的方式(封装数据) 表单数据封装到集合中 表达式封装和模型驱动封装比较 一.结果页面配置: result标 ...

  7. Kafka系列一 基本安装

    一 配置文件(下载.解压.跳过) # Licensed to the Apache Software Foundation (ASF) under one or more # contributor ...

  8. 【轮子狂魔】抛弃IIS,向天借个HttpListener - 基础篇(附带源码)

    这一次我们要玩什么? 先声明一下,由于这篇是基础篇主要是通过这篇文章让大家对使用HttpListener响应Http请求有个大概了解,所以正式的花样轮子在下一篇推出,敬请期待 ^_^ 嗯哼,还有,我标 ...

  9. vs2019编译redis

    版本信息 使用Redis源码版本,解压工程右键生成hiredis项目正常,编译Win32_Interop项目报下图错误(error C2039:system_error:不是std成员;error C ...

  10. ABORT: Can't find command 'my_print_defaults'.

    解决办法是输入如下命令: export PATH=/usr/local/mysql/bin:$PATH 将/usr/local/mysql/bin加到$PATH环境变量里