20162319 2016-2017-2 《程序设计与数据结构》第7周学习总结

教材学习内容总结

1、理解多态
2、掌握抽象类和接口使用
3、理解方法覆盖和动态绑定
4、会用UML建模工具
5、熟悉Java与密码学相关的API

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

  • 问题1:try-catch如何理解
  • 问题1解决方案:try-catch语句用来标识可能抛出异常的一个语句块。接在try块之后的catch子句定义如何处理一种具体的异常。
  • 问题2:try块一定要有catch子句吗?
  • 问题2解决方案:try块不一定非要有catch子句。如果没有catch子句,则可以使用finally子句来看看是否有对应的情况

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

代码托管

本周虚拟机出现问题 代码是Push上去了但是代码量显示不出来 之前的git push也出错了 还有git commit出错 现在正在解决(http://www.cnblogs.com/chinxi/p/6139469.html)这是我的解决方案 但是还没有成功

上周考试错题总结

错题1:下面哪些Linux 命令可以ASCII码和16进制单字节方法输出Hello.java的内容?
A .
od -b -tx1 Hello.java
B .
od -tcx1 Hello.java
C .
od -tc -tx1 Hello.java
D .
od -tbx1 Hello.java
原因:-b 是以八进制输出 没有熟练Linux命令
错题2:The original class that is used to derive a new class using inheritance is called ____________________ (通过继承派生出新类的原有类称为____).
A .
a superclass(超类)
B .
a parent class(父类)
C .
a base class(基类)
D .
all of the above(以上都正确)
E .
neither a, b, nor c(以上都不正确)
原因:The original class can be called a superclass, a parent class and/or a base class.
错题3:In order for derived classed to have access to encapsulated data members and methods of superclasses, the data members and methods should be declared using the ____________________ modifier(为了能在派生类中引用超类中封装的数据成员和方法,可以使用修饰符____声明).
A .
private
B .
public
C .
protected
D .
final
E .
static
原因:Data members and methods declared using the protected modifier can be accessed by subclasses in an inheritance hierarchy, but are still encapsulated from classes and methods outside of the hierarchy.
错题4:The special reference _________________ is used to refer to the parent class in a child class(特殊的引用___用于在子类中调用父类).
A .
this
B .
super
C .
null
D .
parent
E .
none of the above(以上都不是)
原因: The super reference refers to the parent class in a derived class.
错题5:A _______________________ class represents a generic concept in a class hierarchy(表示类层次中的一般概念).
A .
super(超类)
B .
abstract(抽象类)
C .
interface(接口类)
D .
shadow(隐藏类)
E .
generic(一般类)
原因:An abstract class represents a generic entity that is not completely defined. An abstract class cannot be instantiated. It contains one or more abstract methods, which are methods that should be overridden by subclasses.
错题5:Which of the following key words indicates a new class is being derived from an existing class? (下面哪个关键字表明新类是从当前类派生的?)
A .
super
B .
final
C .
extends
D .
inherits
E .
expands
原因:The key word extends indicates that a new class is being derived from an existing class.
错题6:To invoke a parent’s constructor in a subclass, we use the ______________ method(子类为了调用父类的构造函数,我们使用____方法).
A .
abstract
B .
construct
C .
parent
D .
super
E .
extends
原因:The super method is used to invoke a parents constructor from a subclass.
错题7:If a subclasses constructor does not make an explicit call to a superclass's constructor, ______________________ (如果子类构造函数没有显式调用超类的构造函数,那么
___).
A .
a run-time error will result(将产生运行时错误).
B .
a compile-time error will result(将产生编译时错误).
C .
the constructor will be called anyway(构造函数不管怎样都会被调用).
D .
the class will be implicitly declared as abstract(该子类将被隐式声明为abstract).
E .
none of the above(以上都不是)
原因:The child's constructor will implicitly call the superclass's constructor if it is not done explicitly. This will ensure that the class is properly initialized.
错题8:All Java classes are subclasses of the ___________________ class(所以的Java类都是___类的子类).
A .
String
B .
java.lang
C .
Java
D .
Class
E .
Object
原因:All classes are subclasses of Java's Object class, whether explicitly specified or not.
错题9:Which of the following methods are included in every class created in Java by inheritance? (在Java中通过继承创建的每个类中均包含以下哪个方法?)
A .
next
B .
toString
C .
compareTo
D .
charAt
E .
none of the above(以上都不是)
原因:The toString method is defined in the Object class, and is therefore included in every Java class via inheritance.
错题9:Methods and variables declared as private in a parent class cannot be accessed in a child class(在父类中声明为private的方法和变量不能被子类访问).
A .
true
B .
false
原因:In order for a child class to have access to the private data and methods of a parent class, they should be declared using the protected modifier, which still enforces encapsulation, but allows for flexibility in an inheritance hierarchy.
错题10:In Java subclass can only extend one parent class(在Java中子类只能继承一个父类).
A .
true
B .
false
原因:Allowing a subclass to extend multiple parent classes leads to multiple inheritance, which is not supported in Java.
错题11:如果有以下的程序代码:
Int x=100;
Int y=100;
Integer wx=x;
Integer wy=y;
System.out.println(xy);
System.out.println(wx
wy);
在JDK5以上的环境编译与执行,则显示的结果是
A .
true、true
B .
true、false
C .
false、true
D .
编译失败
原因:没理解代码
错题11:如果有以下的程序代码:
int[] arr1 = {1, 2, 3};
int[] arr2 = new int[arr1.length];
arr2 = arr1;
for(int value : arr2) {
System.out.printf("%d", value);
}
以下描述何者正确?
A .
执行时显示123
B .
执行时显示12300
C .
执行时出现 ArrayIndexOutOfBoundException 错误
D .
编译失败
错题12:如果有以下的程序代码:
String [][] strs={
{“Java”,“Java”,“Java”} ;
{“Java”,“Java”,“Java”,“Java”};
};
For(______ row:strs){
For(____ str:row){
.........
}
}
空白处应该分别填上
A .
String、String
B .
String、String[]
C .
String[]、String
D .
String[]、String[]

结对及互评

20162302(http://www.cnblogs.com/yangjingdian/p/6686697.html)

评分标准

  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分

点评模板:

  • 博客中值得学习的或问题:
    文字清晰明了 有逻辑性与学习性

  • 代码中值得学习的或问题:
    遇到代码问题不只是简单的纸上谈兵,会在得知错题的情况下用虚拟机验证

  • 基于评分标准,我给本博客打分:8分。得分情况如下:

    • 周五前发博客
    • 感想,体会不假大空
    • 排版精美
    • 进度条中记录学习时间与改进情况
    • 有动手写新代码
    • 课后选择题有验证
    • 代码Commit Message规范
    • 错题学习深入
  • 参考示例

点评过的同学博客和代码

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

学习进度条

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

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

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

  • 计划学习时间:300小时

  • 实际学习时间:150小时

  • 改进情况:

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

参考资料

posted on 2017-04-16 22:52  20162319莫礼钟  阅读(194)  评论(4编辑  收藏  举报