第五周作业

20182302 2019-2020-1 《数据结构与面向对象程序设计》第5周学习总结

教材学习内容总结

  • 本章解释了继承的概念,继承是从已有类派生新类的一个过程,是支持软件复用思想的一种方法
  • 子类实例不依赖于父类实例
  • 继承是单向的,不允许多重继承。
  • 客户端与服务器端的传递信息。
  • 学习凯撒密码的使用方法,如何编写有理数和复数计算器。

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

  • 问题1: 无法找到IP地址
  • 问题1解决方案:通过打开Windows+R,cmd,ipconfig查找本机IP。
  • 问题2:抽象类、抽象方法的作用是什么?
  • 问题2解决方案:抽象类表示一般的概念,有一些没有声明的方法,以供子类重写。抽象方法提供方法签名,由子类继承它们。

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

  • 问题1: 在java中输入字符遇到吃回车问题
  • 问题1解决方案:百度后得知通过将nextline改为next可以解决,nextline常发生吃回车问题
  • 问题2:Connection timed out: connect
  • 问题2解决方案:IP地址输入存在错误,找到后重新输入

[https://gitee.com/besti1823/20182302shiyanyi00/blob/master/zuoyea/.keep]

上周考试错题总结

  • The instruction super( ); does which of the following?
    A .calls the method super as defined in the current class
    B .calls the method super as defined in the current class'parent class
    C .calls the method super as defined in java.lang
    D .calls the constructor as defined in the current class
    E .calls the constructor as defined in the current class'parent class
  • instruction super表示对当前类的父类中某些内容的调用。因为除了super()之外没有消息,所以它是对父类构造函数的调用。错因:理解不清楚,定义未能记忆。
  • Aside from permitting inheritance, the visibility modifier protected is also used to
    A .permit access to the protected item by any class defined in the same package
    B .permit access to the protected item by any static class
    C .permit access to the protected item by any parent class
    D .ensure that the class can not throw a NullPointerException
    E .define abstract elements of an interface
  • 被保护的可见性修饰符被用来以受保护(保护)的方式控制对该项的访问。保护措施是访问仅限于当前类(如私有项目)、同一包中的类或此类的扩展类。
  • Which of the following is an example of multiple inheritance?
    A .A computer can be a mainframe or a PC
    B .A PC can be a desktop or a laptop
    C .A laptop is both a PC and a portable device
    D .A portable device is a lightweight device
    E .Macintosh and IBM PC are both types of PCs
  • 多重继承意味着给定的类继承自多个父类。在上面列出的这些中,笔记本电脑继承了个人电脑和便携式设备的特性。A、B和E中的答案都是单个继承的例子,其中一个类至少有两个子类(在A中,计算机有子大型机和PC,在B中,PC有子台式机和笔记本电脑,在E中,PC有子Macintosh和IBM PC)。答案d表示类的属性
  • If a programmer writes a class wanting it to be extended by another programmer, then this programmer must :change private methods and instance data to be protected
  • 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 relationship between a parent class and a child class is referred to as a(n) ________ relationship.
    A .has-a
    B .is-a
    C .was-a
    D .instance-of
  • 多重继承意味着给定的类继承自多个父类。在上面列出的这些中,笔记本电脑继承了个人电脑和便携式设备的特性。A、B和E中的答案都是单个继承的例子,其中一个类至少有两个子类(在A中,计算机有子大型机和PC,在B中,PC有子台式机和笔记本电脑,在E中,PC有子Macintosh和IBM PC)。答案d表示类的属性。
  • Interface classes cannot be extended but classes that implement interfaces can be extended.
    A .true
    B .false
  • 任何类都可以扩展,无论它是接口、实现接口还是两者都不是。唯一的例外是类被显式地修改为“final”,在这种情况下它不能被扩展
  • A derived class has access to all of the methods of the parent class, but only the protected or public instance data of the parent class.
    A .true
    B .false
  • 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.
  • 派生类可以重新定义父类的任何实例数据或方法。父类的版本现在是隐藏的,但是可以通过使用super来访问,如在super.x中一样。
  • Although classes can be inherited from one-another, even Abstract classes, interfaces cannot be inherited.
    A .true
    B .false
  • 接口具有普通类所具有的所有继承属性。因此,您可以创建接口继承层次结构,就像创建类继承层次结构一样。但是,您不能做的是实例化一个必须实现的接口。

结对及互评

评分标准

  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分

点评:

  • 博客中值得学习的或问题:
    • 问题:排版能力仍需提高
    • 错误总结缺少,做题时缺少仔细思考
  • 代码中值得学习的或问题:
    • 本周代码总量较上多
    • 代码编写时规范性有待提高
  • 基于评分标准,我给本博客打分:12分。得分情况如下:正确使用Markdown语法(加1分)模板中的要素齐全(加1分)教材学习中的问题和解决过程(加2分)代码调试中的问题和解决过程(加2分)本周有效代码超过300分行(加2分)感想,体会不假大空(加1分)进度条中记录学习时间与改进情况(加1分)结对学习情况真实可信(加1分)有动手写新代码(加1分)

点评过的同学博客和代码

  • 本周结对学习情况
  • 结对学习内容
    - 一起完成第四次实验
    - 共同讨论上次测试的错题
    - 讨论类的层次应该如何设计
  • 上周博客互评情况

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

平时需要及时复习练习,对不懂内容要及时询问。需要提升自学能力,对所发博客一点一滴去做。

学习进度条

代码行数(新增/累积) 博客量(新增/累积) 学习时间(新增/累积) 重要成长
目标 6000行 25篇 300小时
第一周 143/200 2/2 7/10 学会对虚拟机进行基础设置,学会git程序简单使用
第二周 388/500 3/4 10 /15 学会部分基础编码,掌握循环格式话输出等内容
第四周 807/1000 1/2 17/ 18 学会运用IDEA编写和测试代码
第五周 2096/1500 2/2 17/20 学会运用IDEA编写和测试代码

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

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

  • 计划学习时间:20小时

  • 实际学习时间:17 小时

  • 改进情况:提高了代码总量,对所留作业进行相应知识尽心一定学习,对端口仍不熟却有一定了解。

参考资料

posted @ 2019-10-07 20:55  20182302  阅读(232)  评论(1编辑  收藏  举报