20,182,310 fourth week learning summary

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

Learning content summary

1. Understand that UML Unified Modeling Language, learning class name, attributes (data), the relationship between the operation (method), a simple rudiments of UML diagrams.

2. Understand the methods of analysis, the data type declarations and declarations of the method, the method is a set of programming statements. The method java program is part of a class. Method declaration header includes a return type, method name and parameters of the method accepted list of statements constitute the method body is defined by the range delimited by curly braces.
The return value type must declare the header and methods consistent return value type specified.

3. Inter-class relations have basic three - dependent, aggregation, inheritance. Dependencies: a situation-dependent class another class called dependency. A class of objects containing objects of another class is called inheritance.

4.this reference. this can be used to reference objects that are currently running. this reference is also used to distinguish constructor arguments and instance variables of the same name.

5.java interface is a set of constants and abstract methods set. Interfaces can not be instantiated. A plurality of classes may be implemented by the same interface, a class can implement multiple interfaces.

6. understand the software development activities of four fundamental processes that determine software requirements, software design, implementation, software design, software testing. Learn pseudo-code, product code, test statement.

Textbook learning and problem-solving process

  • Question 1: toString difference and return the return value?
  • Problems Solution 1: toString method returns a string, return a return value (variable)
  • Problem 2: using UML class diagram
  • Problems Solution 2: 1. The solid line connecting two classes represent the relationship between two classes. 2 with the arrow directed association is unidirectional. Other types of object-oriented class 3. The relationship between the available different line and arrows. After then slowly learning will be more skilled.


  • Question 3: the bonus questions about the string buffer
  • Question 3 Solution: length capacity not return a string, but the current maximum capacity. Understand capacity () and length () relationship, the former is the maximum capacity, the default is 16, length returns the current length. Meanwhile, when the capacity which can be specified configuration StringBuffer

Code debugging and problem solving in the process

  • Question 1: When writing a book of 104 surface Die.java, a large number of errors at compile time.
  • Problem 1 Solution: Read the book, Die Java class library class is not predefined. In order to allow this program is compiled and run, have their own definition of the class object Die complete service. Die class constructor is called when writing the same time, create a new instance of the class Die with the new operator.
  • Question 2: git repository problems, the situation can not upload the code appears when uploading code to the cloud.
  • Problem 2 Solution: Re-create a warehouse in the cloud code again to a new git repository
  • Question 3: How statistics the number of lines of code in IDEA?
  • Question 3 solutions: you can download the plug-in IDEA. But this week I have not yet accustomed to this usage, still using scripts statistical code in Linux.

Managed Code 1

Code hosting 2

(Submit half-time code, the virtual machine problems I re-created one yard cloud warehouse for submission)

Last week exam wrong question summary

  • Wrong question 1:
  • The wrong question 1 Solution: Local variables are those "local" variables in a method declaration thereof, that is, they can only be accessed inside the method. Global variables are variables that can be accessed from anywhere, and the parameter is passed into the method variables. The reason: there is no clear global and local variables. Examples of data can be viewed as a global variable of the entire object.
  • 2 wrong question:
  • Solution 2 wrong question: Constructor applied to the "structure" objects, i.e., set the initial value of the data instance. This is not required, but can usually be completed. Visibility modifiers interface objects used by the methods and instance data decisions.
  • 3 wrong question:
  • Solution 3 wrong question: when the method of sharing the same name, they are called overloading. Number and type of arguments passed in the message provide information to invoke the correct method.
  • 4 wrong question:
  • 4 Solutions wrong question: length and toUpperCase message has no parameters, substring has two int parameters. For equals, the string must be passed as a parameter, the received message character string is compared with the character string passed as a parameter.
  • The reason: there is no ability to understand pass parameters and length of equals
  • Wrong question 5
  • Solution 5 wrong question: in the case of A, the value 0 (a int) is extended to double precision. In the case of C, the addition operation is performed drawn 0.3, then call doublefoo. D parameter list is illegal because it contains two parameters instead of a double precision.
  • 6 wrong question
  • The wrong question 6 solution: declare any type constructor void of even a violation of grammar, you will receive a syntax error.
  • 7 wrong question
  • The wrong questions 7 Solution: Java method can also return (reference) objects, such as String. Reason: careless, forgetting there string ...
  • 8 wrong question
  • 8 Solutions wrong question: Packaging is a concept that should be protected from accidental (or intentional) misuse.

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. (Last week's blog I have used the correct format, but how wrong it was, I made reference to what other students blog, it is the same, indicating it hopes assistant)
    • Question: code hosting screenshot is not it all the shots? Not particularly clear requirements, but it seems to have all the shots.
  • Worth learning or problems in your code: None
  • 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 fourth week of the study, began to increase the amount of work, while also increasing the corresponding classroom practice project. I feel the Java This course requires more practice. Learning is no longer confined to the code on the books, according to the blog is more self-study project. But from the beginning you can only resort to the students. Now slowly able to solve some problems themselves, feel the changes are still very happy.

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 three weeks 470/625 2/4 20/40 Society is defined using the scanner defined class
the fourth week 1444/2069· 2/4 20/60 IDEA and to download and install plug-ins, learn TDD debugging, writing test code

Guess you like

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