学号 2017-2018-20172309 《程序设计与数据结构》第4周学习总结
教材学习内容总结
尽量简单的总结一下本周学习内容
尽量不要抄书,浪费时间
看懂就过,看不懂,学习有心得的记一下
教材学习中的问题和解决过程
- 问题1:XXXXXX
- 问题1解决方案:XXXXXX
- 问题2:XXXXXX
- 问题2解决方案:XXXXXX
- ...
代码调试中的问题和解决过程
- 问题1:XXXXXX
- 问题1解决方案:XXXXXX
- 问题2:XXXXXX
- 问题2解决方案:XXXXXX
- ...
代码托管
(statistics.sh脚本的运行结果截图)
上周考试错题总结
错题1及原因,理解情况:
If two variables contain aliases of the same object then
A . the object may be modified using either alias
B . the object cannot be modified unless there‘s but a single reference to it
C . a third alias is created if/when the object is modified
D . the object will become an "orphan" if both variables are set to null
E . answers A and D are correct正确答案:E 我的答案:A
错误原因:选项没有看完,导致没有选D。错题2及原因,理解情况
What happens if you attempt to use a variable before it has been initialized?
A . A syntax error may be generated by the compiler
B . A runtime error may occur during execution
C . A "garbage" or "uninitialized" value will be used in the computation
D . A value of zero is used if a variable has not been initialized
E . Answers A and B are correct正确答案:E 我的答案:B
错误原因:没有正确的认识语法错误,语法错误就是编辑时的错误,俗称病句。错题3及原因,理解情况:
What is the function of the dot operator?
A . It serves to separate the integer portion from the fractional portion of a floating point number
B . It allows one to access the data within an object when given a reference to the object
C . It allows one to invoke a method within an object when given a reference to the object
D . It is used to terminate commands (much as a period terminates a sentence in English)
E . Both B and C are correct正确答案:E 我的答案:B
错误原因:在课本上只看到了C的相关语句,所以直接选了C错题4及原因,理解情况:
Consider the following two lines of code. What can you say about s1 and s2?!
String s1 = "testing" + "123";
String s2 = new String("testing 123");
A . s1 and s2 are both references to the same String object
B . the line declaring s2 is legal Java; the line declaring s1 will produce a syntax error
C . s1 and s2 are both references to different String objects
D . s1 and s2 will compare "equal"
E . none of the above正确答案:C 我的答案:B
错误分析:以为S1是错误的语法,后来才发现没有问题。回去后直接试了下发现它们都是对的。错题5及原因,理解情况:
The String class‘ compareTo method
A . compares two string in a case-independent manner
B . yields true or false
C . yields 0 if the two strings are identical
D . returns 1 if the first string comes lexically before the second string
E . none of the above正确答案:C 我的答案:D
错误分析:没有正确理解题目的意思,我的理解为:“class”与“method”相比。题目的意思为:“使用String类char compareTo()方法的输出。输出规则是:按照字典顺序+0-分别表示先于、等于、后于STr字符串。
其他(感悟、思考等,可选)
xxx
xxx
学习进度条
代码行数(新增/累积) | 博客量(新增/累积) | 学习时间(新增/累积) | 重要成长 | |
---|---|---|---|---|
目标 | 5000行 | 30篇 | 400小时 | |
第一周 | 075/200 | 1/1 | 05/20 | |
第二周 | 560/500 | 2/2 | 18/38 | |
第三周 | 972/1000 | 4/4 | 39/60 | |
第四周 | /1300 | 2/9 | 30/90 |
参考文献
1.Java语言中的错误
2.
3.