其他分享
首页 > 其他分享> > 20182315 第六周学习总结

20182315 第六周学习总结

作者:互联网

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

教材学习内容总结

(1):当某类名声明一个引用变量,该变量可引用这个类的任意对象,还可以引用继承他的类的任何对象。

(2):Mammal pet; Horse secretariat=new Horse(); pet=secretasriat;该程序将父类定义的变量pet赋给子类Horse使用。但反过来的操作会丢失一些数据,因为子类包括的方法可能是父类所不具备的,所以会引起数据丢失。

(3): Animal creature=new Horse();这种思路也是可行的。

(4):Mammal继承于Animal,Horse继承于Mammal。而Animal定义的变量可调用三个类的方法。如果三个类都有move这个方法,那如何调用?在使用前应提前声明

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

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

代码托管

(由于本人在本周使用新建文件夹,因此本周的代码量不包括之前的代码量)

上周考试错题总结

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()之外没有消息,所以它是对父类构造函数的调用。

A .All classes must have 1 parent but may have any number of children (derived or extended) classes

B .All classes must have 1 child (derived or extended) class but may have any number of parent classes

C .All classes must have 1 parent class and may have a single child (derived or extended) class

D .All classes can have any number (0 or more) of parent classes and 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

解析:Java支持继承,但不支持多重继承,因此Java类可以有任意数量的子节点,但只有一个父级。此外,由于所有Java类都直接或间接从对象类继承,因此所有Java类只有一个父类。
答案:A

A. interfaces

B. modular

C. information hiding

D. code reuse

E. correctness

分析:通过扩展一个类并继承它,新类不必重新实现任何这些继承的方法或实例数据,从而节省了程序员的工作量。因此,代码重用是为了您的需要扩展它而重用其他代码的好处。

答案:D

结对及互评

  1. 正确使用Markdown语法加1分:

  2. 模板中的要素齐全加1分

  3. 教材学习中的问题和解决过程, (加4分)

  4. 代码调试中的问题和解决过程, (加2分)

  5. 周五前发博客的加1分

  6. 进度条中记录学习时间与改进情况的加1分

  7. 错题学习深入的加1分

  8. 结对学习情况真实可信的加1分

点评过的同学博客和代码

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

Java在自学的过程中难免会遇到困难,但在解决困难的过程中,可以锻炼自身的分析问题,解决问题的能力。对答案的检索,以及优质学习平台的发掘都有不可代替的作用

学习进度条

代码行数(新增/累积) 博客量(新增/累积) 学习时间(新增/累积) 重要成长
目标 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
第五周 800/1000 3/4 20/18
第六周 700/900 3/3 20/19

参考资料

标签:总结,current,Java,接口,第六周,classes,Speaker,class,20182315
来源: https://www.cnblogs.com/zjwbk/p/11674065.html