20182318 2019-2020-1 "Object-oriented programming and data structure" and the second study concluded three weeks

20182318 2019-2020-1 "Object-oriented programming and data structure" and the second study concluded three weeks

Learning content summary

The second chapter textbook content

  • Learn Java basic data types and data conversion knowledge;
  • Println and print usage and differences of;
  • The concept and usage escape character;
  • Operators (increment decrement, assignment, addition, subtraction mode) usage and priority;
  • Scanner class to learn to write programs that can be entered.
  • After-school self-test is completed, and work PP2.2, PP2.4, PP2.6 and so on.
  • The third chapter

1.Random class is used to generate a random number
2.Matn mainly basic mathematical functions, static methods
3.NumberFormat DecimalFormat and output formatting information, the printf format string containing the output values

4. A wrapper represents a particular basic data types

Textbook learning and problem-solving process

Question 1: static methods and non-static method what's the difference?
Question 1 solution: two different life cycle. Life-cycle as long as static methods with the corresponding class. But not as long as the life cycle of an object is instantiated and class static methods. Static methods can be called directly, call the class name and the object call. However, non-static method can only be called by objects.

Question 2: The escape character \ r and \ n tell ribbon
Question 2 Solution: \ n denotes carriage return line; \ r represents a carriage return to the first current line.

Code debugging and problem solving in the process

  • Question 1: did not notice no decimal integer division
  • Problem 1 Solution: After careful observation of thinking to solve
  • Question 2: initial definition of continuous assignment error
  • image

  • Problem 2 Solution: To assign a single
  • Question 3: static variables, dynamic variables misquoted
  • image

  • Question 3 Solution: After Baidu, figure out the difference

Code hosting

(Run results screenshot statistics.sh script)

Last week exam wrong question summary

  • 1 wrong question and the reasons (Multiple choice | 1 minute)
    an In the Java May Contain A variable
    A
    .
    A value or A Reference
    B
    .
    A Package Penalty for
    C
    .
    A Method,
    D
    .
    A class
    E
    .
    The any of above at The
    correct answer: A Your The answer: E
    View knowledge | Collapse resolve

Java variables contain values or references to instances of classes (which contain values and/or additional references).

  • 错题2及原因( 单选题 | 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 你的答案: D
    查看知识点 | 收起解析

By definition, a alias provides a means by which an object can be modified (an alias is like a pointer). By definition, a alias provides a means by which an object can be modified (an alias is like a pointer). If both variables are set to null, then the object is not referenced by any variable (via any alias) and it does, indeed, become an "orphan" and it will be garbage collected at some point in the future.

  • 3 multiple choice questions wrong and the reasons | 1 minute)
    ? Which of the Properties are to true String Objects
    A
    .
    Their lengths Never Change
    B
    .
    At The Shortest String length has ZERO
    C
    .
    Individual characters the WITHIN A String May at The BE changed a using the replace Method,
    D
    .
    at the index of at the First Character in String iS a One
    E
    .
    Only a and B are to true
    correct answer: E your answer: D
    View knowledge | Collapse resolve

Strings are immutable. That means that once a string object is created it cannot be changed. Therefore the length of a string never changes once it has been created. The shortest length string is "" there are no characters between the quotes, so the length is zero. The replace method allows you to create a new string from an original one, replacing some of the characters. The index of the first location in a String is zero not one. Also, the last byte of every string contains the end-of-string character which is a byte of low-values, or binary zeros.

  • 错题4及其原因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 你的答案: D
    查看知识点 | 收起解析

The dot operator is appended directly after the object reference, followed by the data or method to which access is desired. In the case of data, the access may be for reading or writing. In the case of a method, the access is to allow one to invoke the method. The dot within a floating point number is a decimal point not a dot operator.

Pair peer review and

  • Pair learning content
  • Some discussion of the use and role of classes and packages.
  • Problems arising in the course of writing code to solve mutual discussion.
  • To discuss how the book written questions after class.

    Comment:

  • Worth learning problems or blog:
  • Rich content
  • Detailed questions
  • Based on score, I give this blog scoring: 14 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 1 point

  4. Code debugging and problem solving in the process, a problem 1 point

  5. Week over 300 branches valid code (plus 2 points)

  6. Other plus points:

    • 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
    • Learning the wrong questions in depth, add 1 point
    • Pair learning authentic plus 1 point

Comments had students blog and code

  • Pair this week learning
    • 20182333
    • Pair Photo

    • Pair learning content
      • XXXX
      • XXXX
      • ...
  • Last week blog peer assessment case

Other (perception, thinking, etc., optional)

Under real effort needed to learn

Learning progress bar

The number of lines of code (add / accumulate) Blog amount (add / accumulate) Learning time (add / accumulate) Important growth
The third week 453/1000 3/7 22/60

Try recording "planned learning time" and "actual learning time" to the end see if you can improve their ability to plan. This study is very important work, is also useful.
Consuming an estimated equation: Y = X + X / N , Y = XX / N, training more often, X, Y will close.

Reference: Why is estimated that software engineering software so hard , software engineering estimation method

  • Plan study time: 24 hours

  • The actual study time: 20 hours

  • Improvements:

(Available see more modern software engineering courseware
software engineers the ability to self-evaluation form
)

Reference material

Guess you like

Origin www.cnblogs.com/1400694592qq/p/11569790.html