首页 > 其他 > 详细

20172319 2018.03.12-19 《程序设计与数据结构》第2周学习总结

时间:2018-03-17 22:59:34      阅读:214      评论:0      收藏:0      [点我收藏+]

学号 20172319 2018.03.12-19 《程序设计与数据结构》第2周学习总结

教材学习内容总结

  • 1.字符串:基本定义;print与println方法的区别;字符串的拼接;转义序列的应用。
  • 2.变量与赋值:变量;常量;赋值语句。
  • 3.基本数据类型:四整二浮点一字符一布尔。
  • 4.表达式:运算符的种类及其使用规则。
  • 5.数据类型转换:基本数据类型间的转换(扩展及压缩);数据转换方式:赋值(只能扩展)、提升、强制。
  • 6.交互式程序:Scanner 类。

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

  • 问题1:怎么看转义序列中的\t
  • 问题1解决方案:通过百度搜索;\t是制表符,相当于tab键,一个tab等同于8个空格(然而还是不懂8个空格就怎么制表了),后来终于找到制表符的定义:产生一定距离的空白,使文本看上去像一个表格。 ?? (行行行,你帅你说的都对)
  • 问题2:交互式程序中关于nextInt()、next()和nextLine()的理解
  • 问题2解决方案:刚开始玩时确实遇到点问题,但后来能敲了也就不大想理了(其实是作业太多没做完 ?? );后面听老铁提到了,蓝墨云上也有人提起,好好查了一下关于nextInt()、next()和nextLine()的理解

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

  • 问题1:敲代码的常见问题(空格、符号漏敲,变量忘记定义……)
  • 问题1解决方案:个人习惯还没养成/代码太多, 想赶快敲完 (不存在的-做完习题后深有体会)/练的还不足量
    技术分享图片
    技术分享图片

  • 问题2:编写的代码有错误
  • 问题2解决方案:一时难以发现,只有通过机器不断提示、运行程序出现错误或与题目不相符的情况后才加以改正
    技术分享图片

代码托管

技术分享图片
技术分享图片

  • 看到数字有木有很好奇 ?? git add了不想上传的,结果去网络上找方法,结果看到了一个revert皮了一波很快乐(刚敲的157行不见了 ?? )至于后面:重敲呗,就当练习了。

上周考试错题总结

  • 错题1:
  • The ability to directly obtain a stored item by referencing its address is known as (通过引用地址直接获得存储项的能力被称为___)
  • A .random access (随机存取)
  • B .sequential access (顺序存取)
  • C .read-only access (只读访问)
  • D .fetch access (获取访问)
  • E .volatility (易变性)
  • 原因:不懂瞎蒙的。
  • 理解情况:直接和随机访问有时是一个意思。

  • 错题2:
  • It is important to dissect a problem into manageable pieces before trying to solve the problem because (试图解决问题之前,把一个问题分解成可控制的几部分是很重要的,因为)
  • A .most problems are too complex to be solved as a single, large activity (大多数问题太复杂,以至于不能作为一个单独大型的活动来解决)
  • B .most problems are solved by multiple people and it is easy to assign each piece to a separate person (大多数问题都是由很多人解决的而且把每一部分分配给不同的人是很容易的)
  • C .it is easier to integrate small pieces of a program into one program than it is to integrate one big chunk of code into one program (将程序的小部分整合到一个程序中比将一大块代码整合到一个程序中更容易)
  • D .our first solution may not solve the problem correctly (我们的第一个方案可能无法正确解决问题)
  • E .all of the above (以上皆是)
  • 原因:热静分析,每个都有道理(其实课本这里并没有仔细看 ?? )
  • 理解情况:一系列相关的小任务解决了,大任务就解决了。

  • 错题3:
  • In the following list, which statement is not true regarding Java as a programming language? (关于Java这种程序设计语言,下面的哪种说法是不正确的?)
  • A .It is a relatively recent language, having been introduced in 1995 (它是一种相对现代的语言,于1995年被引入)
  • B .It is a language whose programs do not require translating into machine language before they are executed (它是一种执行程序前不需要被转换成机器语言的语言)
  • C .It is an object-oriented programming language (它是一种面向对象的程序设计语言)
  • D .It is a language that embraces the idea of writing programs to be executed using the World Wide Web (这种语言可以使用万维网来编写要执行程序的想法)
  • E .All of the above are true (以上说法都是正确的)

  • 原因:忘了,可能但是脑子抽了。
  • 理解情况:不先解释成机器语言是给鬼看哦 ?? (电脑是傻瓜,机器看不懂也就执行不出来)

  • 错题4:
  • Comments should (注释应该)
  • A .rephrase the code it explains in English (用英语复述它解释的代码)
  • B .be insightful and explain what the instruction‘s intention is ( 有深刻见解并解释指令的意图是什么)
  • C .only be included in code that is difficult to understand (仅仅包含在难以理解的代码中)
  • D .be used to define variables whose names are not easy to understand (被用于解释难以理解的变量名称)
  • E .all of the above (以上皆是)

  • 原因:题目讲得太玄了
  • 理解情况:嗯,B说的有道理

  • 错题5:
  • Which of the following is not syntactically legal in Java? (在Java中,下列哪一条语法不合法?)
  • A .public class Foo
  • B .System.out.println("Hi");
  • C .{ }
  • D .s t a t i c main(String[ ] args)
  • E .only B is legally valid, all of the rest are illegal (只有B是合法的,其余都不合法)

  • 原因:接触太少,对书中所述并没有固化
  • 理解情况:空格分隔开了,编译器不会识别

  • 错题6:
  • Which of the following is a legal Java identifier? (下面哪个是合法的Java标识符?)
  • A .i
  • B .class
  • C .ilikeclass!
  • D .idon‘tlikeclass
  • E .i-like-class

  • 原因及理解情况:哦,class是保留字,无法充当标识符。

  • 错题7:
  • A unique aspect of Java that allows code compiled on one machine to be executed on a machine of a different hardware platform is Java‘s (Java的独特之处在于其___,它允许在一台机器上编译的代码在不同的硬件平台上执行)
  • A .bytecodes (字节码)
  • B .syntax (语法)
  • C .use of objects (所使用的对象)
  • D .use of exception handling (所使用的异常处理)
  • E .all of the above (以上皆是)

  • 原因及理解情况:Java程序的翻译过程是首先将它编译成字节码,它在体系结构上是中立的(也就是说,无论架构平台是什么,都可以使用它们)。要执行该程序,字节码必须由Java编译器进一步编译或由Java虚拟机解释。

  • 错题8:
  • Which of the following is true regarding Java syntax and semantics? (关于Java的语法和语义,下列哪一项是正确的?)
  • A .a Java compiler can determine if you have followed proper syntax but not proper semantics (Java编译器可以判定你是否遵循正确的语法,但不能判定正确的语义)
  • B .a Java compiler can determine if you have followed proper semantics but not proper syntax (Java编译器可以判定你是否遵循正确的语义,但不能判定正确的语法)
  • C .a Java compiler can determine if you have followed both proper syntax and semantics (Java编译器可以判定你是否遵循正确的语义和语法)
  • D .a Java compiler cannot determine if you have followed either proper syntax or semantics (Java编译器不能判定你是否遵循正确的语义或语法)
  • E .a Java compiler can determine if you have followed proper syntax and can determine if you have followed proper semantics if you follow the Java naming convention rules (如果你遵循Java的命名规范,Java编译器就可以判定你是否遵循正确的语法,并且可以判定你是否遵循正确的语义)

  • 原因及理解情况:机器是个傻子,我们让它干嘛就干嘛,语法有错机器可以指出,语义有误它无法思考判断。

  • 错题9:
  • Which of the following would be a good variable name for the current value of a stock? (下面哪个是关于变量“current value of a stock”的最佳命名?)
  • A .curstoval
  • B .theCurrentValueOfThisStockIs
  • C .currentStockVal
  • D .csv
  • E .current

  • 原因及理解情况:光简洁还不够,还得让人明白它背后的含义。

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

  • Java的学习中光有做中学还不够,你还得学会思考,不然敲得再多,那也只是会敲,而不是懂敲,编程是先明白自己想干嘛,才去为这个目的而不断前行,而不跟只笨鹰一样,飞了很远,却不知自己要去哪。
  • 什么都要试一下,千万不能因为它会让你损失代码就不做,代码没了可以重敲,但能接触新的东西也是一件蛮有趣的事。

学习进度条

代码行数(新增/累积) 博客量(新增/累积) 学习时间(新增/累积) 重要成长
目标 5000行 30篇 400小时
第一周 202/202 1/2 15/15 积极主动敲代码
第二周 490/692 1/3 18/33 善于思考

20172319 2018.03.12-19 《程序设计与数据结构》第2周学习总结

原文:https://www.cnblogs.com/Tangcaiming/p/8593075.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!