ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

20182304 《数据结构与面向对象程序设计》第八周学习总结

2019-11-03 11:52:59  阅读:320  来源: 互联网

标签:parent 代码 学习 面向对象 classes variable 数据结构 20182304 class


20182304 《数据结构与面向对象程序设计》第八周学习总结

教材学习内容总结

  • 时间复杂度分析:时间复杂度越低,程序运行效率越高。时间复杂度的计算可通过寻找运行次数最多的程序,计算他的运行次数,取n的最高次方的极数,即为程序的时间复杂度。
  • 栈是一种线性数据结构,采用后进先出(Last in,first out。简称LIFO)的方法处理元素
  • 链表:链表是链式结构的一种。在链表中,对象引用变量也可称为指针,链表中存储的对象泛称为结点
    • 同时,链表需要一个从一个对象到另一个对象的引用变量,又称作自引用的,通常用next来定义。
    • 链表终止于其next引用为空的结点。
    • 访问元素的唯一方法是从第一个元素开始,遍历整个链表直至找到所需元素。
    • 插入结点:插入结点需要先设置一个临时的结点用来防止指针丢失,改变引用顺序是其关键。
    • 哨兵节点:简化判定边界条件
    • 线性集合:集合中的元素按直线方式组织。如:队列集合、栈集合。
  • 队列:先进先出(First In First Out,FIFO),第一个进入的元素也将是第一个退出的元素。
    • 队头(front或head):取出数据元素的一端。
    • 队尾(rear或tail):插入数据元素的一端。
    • 可以使用环形数组来实现队列

教材学习中的问题和解决过程

  • 问题1:在实现栈的过程中,我们使用了泛型T,泛型的概念和作用是什么呢?
  • 问题1解决方案:定义:一种可以存储、操作和管理在实例化之前没有指定类型的对象的一个类,通常用作为标识符。泛型不能被实例化,它只是一个占位符,允许我们去定义管理特定类型的对象的类
  • 问题2:
  • 问题2解决方案:

代码调试中的问题和解决过程

  • 问题1:XXXXXX
  • 问题1解决方案:XXXXXX
  • 问题2:XXXXXX
  • 问题2解决方案:XXXXXX
  • ...

代码托管

(statistics.sh脚本的运行结果截图)

上周考试错题总结

  • Abstract methods are used when defining
    • A .interface classes
    • D .arrays
    • E .classes that have no methods
    • An interface is a class that has defined some of its components, but leaves other components (methods) for you to implement. So, these components (methods) are referred to as abstract and defined in the interface class as abstract.
    • 理解:是要重写父类中的所有抽象方法,即接口让我们实现方法,而非没有方法
  • Which of the following is true regarding Java classes?
    • A .All classes must have 1 parent but may have any number of children (derived or extended) classes
    • E .All classes can have either 0 or 1 parent class and any number of children (derived or extended) classes
    • Further, since all Java classes inherit either directly or indirectly from the Object class, all Java classes have exactly 1 parent class.
    • 理解:java类与Object类有直接见解的关系,所以每个类都有一个父类,那Object类自己呢?
  • A variable declared to be of one class can later reference an extended class of that class. This variable is known as
    • D .polymorphic
    • The term polymorphic means that the variable can have many forms. Under ordinary circumstances, Java is strongly defined that is, a variable, once declared to be of a type, can never change to be of a different type. The exception to this is that polymorphic variables can be any type of derived class (although not at the same time, the variable can change from one type to another).
    • 理解:第九章
  • In order to determine the type that a polymorphic variable refers to, the decision is made
    • by the Java run-time environment at run time
    • The polymorphic variable can take on many different types, but it is not know which type it has taken on until the program is executing. At the time the variable is referenced, then the decision must be made. That decision is made by the run-time environment based on the latest assignment of the variable.
    • 理解:第九章
  • Using the reserved word, super, one can
    • A .access a parent class'constructor(s)
    • B . access a parent class'methods and instance data
    • E .none of the above
    • The super reserved word provides a mechanism for accessing a parent class'methods and instance data (whether or not they are hidden). In addition, a parent class'constructor(s) may be accessed using super. So the correct answer is the combination of A and B which isn't an option so the correct answer is E.
    • 理解:其实两者都可以
  • Interface classes cannot be extended but classes that implement interfaces can be extended.
    • B .false
    • Any class can be extended whether it is an interface, implements an interface, or neither. The only exception to this is if the class is explicitly modified with the word "final" in which case it cannot be extended.
    • 理解:前面带final的不行
  • If class AParentClass has a protected instance data x, and AChildClass is a derived class of AParentClass, then AChildClass can access x but can not redefine x to be a different type.
    • B .false
    • A derived class can redefine any of the instance data or methods of the parent class. The parent class'version is now hidden, but can be accessed through the use of super, as in super.x.
    • 理解:可以用super更改x的值
  • You may use the super reserved word to access a parent class'private members.
    • 理解:Super will allow access to all non-private members of a parent class but, not to the private ones.

结对及互评

评分标准

  1. 正确使用Markdown语法(加1分):
    • 不使用Markdown不加分
    • 有语法错误的不加分(链接打不开,表格不对,列表不正确...)
    • 排版混乱的不加分
  2. 模板中的要素齐全(加1分)
    • 缺少“教材学习中的问题和解决过程”的不加分
    • 缺少“代码调试中的问题和解决过程”的不加分
    • 代码托管不能打开的不加分
    • 缺少“结对及互评”的不能打开的不加分
    • 缺少“上周考试错题总结”的不能加分
    • 缺少“进度条”的不能加分
    • 缺少“参考资料”的不能加分
  3. 教材学习中的问题和解决过程, 一个问题加1分

  4. 代码调试中的问题和解决过程, 一个问题加1分

  5. 本周有效代码超过300分行的(加2分)
    • 一周提交次数少于20次的不加分
  6. 其他加分:
    • 周五前发博客的加1分
    • 感想,体会不假大空的加1分
    • 排版精美的加一分
    • 进度条中记录学习时间与改进情况的加1分
    • 有动手写新代码的加1分
    • 课后选择题有验证的加1分
    • 代码Commit Message规范的加1分
    • 错题学习深入的加1分
    • 点评认真,能指出博客和代码中的问题的加1分
    • 结对学习情况真实可信的加1分
  7. 扣分:
    • 有抄袭的扣至0分
    • 代码作弊的扣至0分
    • 迟交作业的扣至0分

点评模板:

  • 博客中值得学习的或问题:
    • xxx
    • xxx
    • ...
  • 代码中值得学习的或问题:
    • xxx
    • xxx
    • ...
  • 基于评分标准,我给本博客打分:XX分。得分情况如下:xxx

  • 参考示例

点评过的同学博客和代码

其他(感悟、思考等,可选)

xxx
xxx

学习进度条

代码行数(新增/累积) 博客量(新增/累积) 学习时间(新增/累积) 重要成长
目标 5000行 30篇 400小时
第一周 200/200 2/2 20/20
第二周 300/500 2/4 18/38
第三周 500/1000 3/7 22/60
第四周 300/1300 2/9 30/90

尝试一下记录「计划学习时间」和「实际学习时间」,到期末看看能不能改进自己的计划能力。这个工作学习中很重要,也很有用。
耗时估计的公式:Y=X+X/N ,Y=X-X/N,训练次数多了,X、Y就接近了。

参考:软件工程软件的估计为什么这么难软件工程 估计方法

  • 计划学习时间:XX小时

  • 实际学习时间:XX小时

  • 改进情况:

(有空多看看现代软件工程 课件
软件工程师能力自我评价表
)

参考资料

标签:parent,代码,学习,面向对象,classes,variable,数据结构,20182304,class
来源: https://www.cnblogs.com/acgacg/p/11785580.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有