20,182,328 2019-2020-1 "data structures and object-oriented programming," the first four weeks learning summary

20,182,328 2019-2020-1 "data structures and object-oriented programming," the first four weeks learning summary

Learning content summary

1, a better understanding of classes and objects.
2, learning static class and static methods.
3, different types of relationships between learning classes.
4, heavy-duty design and learning methods.
5, learning how to debug.

Textbook learning and problem-solving process

  • Question 1: Why are some variables can be the same name?
  • Problem 1 Solution: Local variables declared within methods and instance variables can be declared at the class level have the same name.
  • Question 2: What is the use of method overloading?
  • Problem 2 Solution: Method may face a list of parameters have not, then will use heavy duty, easy call.

Code debugging and problem solving in the process

  • Question 1: Define variable error, displays an illegal expression.

  • Question 1 solution: private java is encapsulated in the key, instance variables should be declared as private, so beginning to add private.
  • Question 2: class error, displaying invalid method declaration.

  • Problem 2 Solution: the class name to the same file name.
  • Question 3: access method is wrong
  • Question 3 Solution: Access Method variable name first letter should be capitalized.

Code hosting

(Run results screenshot statistics.sh script)

Last week exam wrong question summary

  • The wrong question 1
    at The Instruction Super ();? Which of does at The following
    A .calls at The Method, Super AS defined in at The Current class
    B .calls at The Method, Super AS defined in Current class'parent at The class
    C .calls at The Method, Super AS defined the java.lang in
    D .calls at the constructor defined in AS at the current class
    E .calls at the constructor defined in AS class'parent class at the current
    answer: a
    parsing: instruction super express call to the parent class of the current class in certain elements. Because in addition to super () no messages, it is a call to the parent class constructor.

  • The wrong question 2
    All classes in the Java Directly or indirectly are subclasses of class at The ________.
    A .Wrapper
    B System.String
    C the .Reference
    D .This
    E .Object
    answer: E
    parsing: Java requires that all classes have the parent class. If a class does not extend another class, then by default, it will extend the object class. So the object is a Java class all other classes of parent or parent.

  • Wrong question. 3
    Which of Method A The following IS Not of The Object class?
    A .clone
    B .compareTo
    C .equals
    D .toString
    E The above are .all of Methods of The Object class
    Answer: B
    analysis: object class definitions cloning create any copy of the object is equal to determine whether two objects are the same object, and the object tostring will translate into a string. However, the compareTo not to achieve the object, it is necessary to implement in any class comparable to explicitly implement the interface.
  • The wrong question 4
    Which of IS at The following regarding the Java classes to true?
    A classes, Ltd.All the MUST have have have have 1 parent But May of the any Number The Children (derived or Extended) classes
    B, Ltd.All the MUST have have classes 1 Child (derived or Extended) class But May Number of the any parent classes have have
    C, Ltd.All classes MUST have have parent class. 1 and A SINGLE On May have have Child (Extended or derived) class
    D, Ltd.All CAN classes have have the any Number (More or 0) of the any parent classes and Number of Children (derived Extended or) classes
    E, Ltd.All classes cAN have have either 0 or 1 and the any class number the parent of Children (derived or Extended) classes
    answer: a
    parsing: Java support inheritance, but does not support multiple inheritance, so Java class can have any number of child nodes, but only one parent. In addition, because all Java classes inherit directly or indirectly from the Object class, so all Java classes have only one parent.
  • The wrong question 5
    Two at The Children of Same, parent class are Known AS
    A .aliases
    B .relatives
    C .clones
    D .brothers
    E .siblings
    answer: E
    analysis: the relationship between the two children of the same parents are called siblings (brothers It would imply gender). Clones are copies of the same object, alias is the same object. In Java, brothers and relatives will not be used to define the relationships between classes.
  • Wrong question. 6
    Which of THESE IS correct?
    A II.A Base class parent class or Super IS A class
    B class II.A Base Child IS A derived class or class
    C Child II.A IS A class of Super ITS parent class
    D class parent II.A a subclass of Child ITS iS
    E of .none the above
    answer: a
    Resolution: the term base class, a parent class, the superclass synonyms for each other. They imply inherited class will be used as basis for subsequent extension class (inherited) base class.

Pair peer review and

  • 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, plus 4 points
  4. Code debugging and problem solving in the process, a problem, add 3 points
  5. Week over 300 branches valid code (plus 2 points)
  6. Other plus points: 3

Comments template:

  • Worth learning problems or blog:
    • Informative and streamlined
    • Issues are fully resolved and
    • There are distribution map
  • Code is worth learning or problem:
    • Correct and concise
    • Methods varied it is worth learning

Comments had students blog and code

  • Pair this week learning
    • 20182322

      Other (perception, thinking, etc., optional)

      1, the contents of two weeks to learn gradually become more difficult, a little catch up, but multi spare some free time was able to learn more, the fourth week, I try to spend more time to knock code.
      2, knock knock code on a textbook, the cumulative amount of code, to lay the foundation.

Learning progress bar

The number of lines of code (add / accumulate) Blog amount (add / accumulate) Learning time (add / accumulate) Important growth
aims 5000 rows 30 400 hours
the first week 200/200 2/2 20/20
the second week 300/500 2/4 18/38
The third week 500/1000 3/7 22/60
the fourth week 300/1300 2/9 30/90

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: 30 hours

  • The actual study time: 25 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/monsterhunter/p/11614395.html