20,182,310 second week & third week learning summary

20182310 2019-2020-1 "Object-oriented programming and data structures" Week 2 Week 3 & learning summary

Learning content summary

  • 1. First String class is defined string, then is the difference between print and println escape character study.
  • 2. Understand the variables, constants, assignment statements. Variables: memory means for storing data.
  • 3. Understand learned to use Scanner to achieve interoperability
  • 4. Learning to use computing symbols, learn how to write a simple calculator.
  • 5. declaration and use of variables
  • 6. The definition and use of a simple class.

Textbook learning and problem-solving process

  • Question 1: When learning scanner, not quite understand the meaning of
  • Problem 1 Solution: Add a java.util.Scanner class, which is a new utility for scanning the input text. It is some combination between previous and StringTokenizer Matcher class. Since any data to be retrieved by capturing the same pattern group, or by using an index to retrieve the sections of text. It can then be used in conjunction with a regular expression and method to retrieve a particular type of data item from the input stream. Thus, in addition to the use of regular expressions outside, it can also be arbitrarily Scanner class string and basic types (such as int and double) to analyze the data. By means of the Scanner, you can write a custom parser for any text to be processed. "
  • Question 2: When using Scanner class, do not understand scan.nextInt () meaning
  • Problem 2 Solution: After a review of the book content to understand the significance of this string of code that will return the next input in accordance with the specified type.
  • Question 3: When the assignment to assignment do not understand the scope of the float and double
  • Question 3 Solution: Check Baidu found the answer: double type and float type of major differences are: 1. different number of bytes occupied in memory; 2 different significant digits; 3 can represent a different range of numbers.

Code debugging and problem solving in the process

  • Question 1: When playing Java file, name the file name can not be used "3.1" to name
  • Problem 1 Solution: After asking the students, that will generate a file name with a suffix and therefore changed 301.

  • Question 2: When defining, careless, direct line feed when the adjacent variable definition, with a semicolon.
  • Problem 2 Solution: variable spacing of adjacent commas should be used.

  • Question 3: When you import, a compile error
  • Question 3 Solution: The code amount is too small, not used to add a semicolon

Code hosting


Last week exam wrong question summary

  • Wrong question 1:
  • Solution: For A, charAt returns a char, so there is no problem. In B and C, the situation is the use of a narrow type of calculation and the values ​​are stored as widening wider type. The wide type is stored as the presence of a narrow type of situation, it is necessary only to cast in D.
  • 2 wrong question:
  • Solve: Java first computing x + y, and then cast to String to be output. x + y = 10 + 5 = 15, 15 so that the output statement.
  • 3 wrong question:
  • Solution: This is a reserved word final represents the final value stored in this variable, thus making it constant or unchanged. Although constants may be int type, but constant can be any other type. It is the last reserved word, so that the value can not be changed.
  • 4 wrong question:
  • Resolution: String no mechanism to cast one of the basic types, but there are ways to perform similar operations, and return to the reference position (the charAt) a character, or equivalent return int, float method or the double value . Number stored in the string.
  • Wrong question 5:
  • Solution: Each iterator has a hasNext () method, if there is an iterative element has not been processed, the method is true. Each iteration has a further next () method passing the next element to be processed.
  • 6 wrong question:
  • Solution: Although C does indeed explains the series of zero and non-zero value in this way, but requires the use of Java true and false constants reserved or relationships and / or logical operators logical evaluated.
  • 7 wrong question:
  • Solution: You can also use the following tools to directly compare char variables, but you can only use compareTo, equals, equalsIgnoreCase compare character variables

Pair peer review and

Grading

  • Worth learning problems or blog:
    • Learning: Before assistant pointed out that I did not use the correct format, pairing students use the format is right, I need to pay more to learn.
    • problem:
  • Code is worth learning or problem:
    • More concise code is used, there is some code to complete the self, like I have some of this statement is a direct Transcription, not really figure out the meaning.
  • Based on score, I give this blog scoring: 15 points. Scores are as follows:
  1. Proper use Markdown syntax (1 point):
  2. Elements range (1 point) template
  3. Textbook learning and problem solving process, a problem plus 1 point (3)

  4. Code debugging problems and solutions in the process, a problem plus 1 point (3)
  5. Week over 300 branches valid code (plus 2 points)
  6. Other plus points:
    • Feelings, experience does not leave large empty 1 point
    • Typesetting fine plus one point
    • Progress bar records the learning time and improve the situation of 1 point
    • There are hands-on writing new code, add 1 point
    • After class choice has verified 1 point
    • Learning the wrong questions in depth, add 1 point
    • Comments seriously, I can point out problems and blog code plus 1 point
    • Pair learning authentic plus 1 point

Comments had students blog and code

  • Pair this week learning
  • Last week blog peer assessment case
    • 20182305
    • 20182327

      Other (perception, thinking, etc., optional)

      After entering the second and third weeks, started a number of professional knowledge, learning, rather than before just to write some simple code, began to slowly complex. But for this course or muddle of state, I hope to be able to

Learning progress bar

The number of lines of code (add / accumulate) Blog amount (add / accumulate) Learning time (add / accumulate) Important growth
aims 10,000 lines 30 400 hours
the first week 155/200 2/2 20/20 Initial grasp of linux command, java applets and debugging jdb
the second week 470/511 2/4 20/40 Society is defined using the scanner defined class

Guess you like

Origin www.cnblogs.com/tursws/p/11567609.html