No. 2019-2020-1 learn "data structure and object-oriented programming," the fourth week of learning summary

No. 2019-2020-1 learn "data structure and object-oriented programming," the fourth week of learning summary

Learning content summary

  • Class structure definitions and concepts
  • The construction and use of the method of construction
  • UML class diagram form meanings
  • Relations between classes
  • The method of using the interface, the interface can be realized in a class
  • The method defined structure

Textbook learning and problem-solving process

  • Question 1: do not understand the difference between classes and objects
  • Problem 1 Solution: The object is an instance of the class

Class is a template that describes the behavior and state of a class of objects

  • Question 2: What is the meaning of java inside this generated code is assigned the value of time in which generate this has followed.
  • Problem 2 Solution: When members of the same name and local variables, when used in this method, represents the member variable of the class where the method. (This refers to the current object itself).

Code debugging and problem solving in the process

  • Question 1: getxxx the role is not very clear and setxxx
  • Problems Solution 1: set of parameter assignment, GET return value from the desired set inside, as shown in FIG setAge play the role of screening value, but is only responsible for the return value getage obtained. And both the order will not have any effect.

  • 2 issues: the relationship between classes, objects, methods, three do not understand
  • Problem 2 Solution: see online a very vivid answer

Code hosting

Last week exam wrong question summary

1.Which of the following reserved words in Java is used to create an instance of a class?

A .class

B .public

C .public or private, either could be used

D .import

And .new

Analytical: new to create an instance of the class, such as Car x = new Car ().
***
2.A variable Whose scope WHERE IS IT Restricted to Method The IS Known declared WAS AS A (n-)

A .parameter

B .global variable

C .local variable

D .public instance data

E .private instance data

Analysis: After declaring local variables, can only be referenced inside the method declaration.
***

  1. An example of passing message to a String where the message has a String parameter would occur in which of the following messages?

A .length

B .substring

C .equals

D .toUpperCase

E .none of the above, it is not possible to pass a String as a parameter in a message to a String

Resolution: You must use parameter parameter equals in
***
4.The Expressions that are passed to A Method, in AN Invocation are Called

A .actual parameters

B .formal parameters

C .formal arguments

D .formals

E .any of the above

Analysis: the actual argument (actual parameter, the actual parameter) is actually transmitted in the call to the method of expression
***
5.What happens IF you DECLARE A class constructor to have have void return of the type A?

A .You'll likely receive a syntax error

B .The program will compile with a warning, but you'll get a runtime error

C .There's nothing wrong with declaring a constructor to be void

D .The class' default constructor will be used instead of the one you're declaring

E .None of the above

Analysis: Each has a function in the constructor, if they added a void type it will only be after the emergence of an empty constructor instead of generating a syntax error.
***
6.The following Method Definition Will Result in A header syntax error: public void aMethod ();

A .true

B .false

Analysis: syntax error reason is because it ";" sign behind the end did not follow} {
***
7.Defining formal Including the Parameters The requires the each the Parameters of the type.

A .true

B .false

Analysis: all the formal parameters (defined in the method header) must include their type
***

Pair peer review and

Grading

  • Based on score, I give this blog scoring: 15 points. Scores are as follows:
  1. Proper use Markdown syntax (1 point):

    • Do not use Markdown no extra points

    • A syntax error is not a plus (link does not work, does not form, the list is incorrect ...)

    • Typesetting confusion is not a plus

  2. Elements range (1 point) template
    • Missing "textbook learning and problem solving process" without points
    • Lack of "problem solving and debugging code in the process" without points
    • Managed code can not be opened without points
    • Missing "twinning and peer assessment" can not be opened without points
    • Missing "last week summed up the wrong title examination" can not be a plus
    • The lack of "progress bar" can not be a plus
    • Lack of "reference" can not be a plus
  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)
    • Submitted one week fewer than 20 times without 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
    • Code Commit Message Specification 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
    • 20182318
    • 20182333
    • Pair learning content
      • How to git code in the cloud on the IDEA Code
      • How to use TDD test code
      • Discussion on book learning materials
  • Last week blog peer assessment case

Other (perception, thinking, etc., optional)

This week the main learning object-oriented content, including the content and methods of using class inheritance, etc., I feel more and more difficult, we will try to keep up with everyone's progress, not much beyond

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 126/126 2/2 20/20
the second week 0/126 2/2 20/40
The third week 353/479 2/6 20/60
the fourth week 1760/2239 2/8 30/90

Reference material

Guess you like

Origin www.cnblogs.com/pytznb/p/11614467.html