"Object-oriented programming and data structures," the sixth week of learning summary

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

Learning content summary

  • I learned to use exception handling try-catch to achieve uncaught. Can make exception is caught and thus does not result in a program error exit. Try using written statements may be abnormal, use a catch to write code (can be empty) continues to run after the catch exceptions.
  • "Uncaught exception" refers to the software will not be compiled displayed during compilation at runtime anomalies but will lead to abnormal program exit, such as: "ArithmeticException", "IndexOutOfBoundException" and so on. - inheritance between child and parent class established "is a" relationship, using the reserved word extends
  • Examples of subclass class instance does not depend on the parent
  • Inheritance is a one-way
  • It does not allow multiple inheritance
  • Override (redefine) the parent class method
  • Subclasses can indirectly reference the private member

As simple as possible to sum up the week learning content
try not asked to copy a waste of time
to read it before, read, learning about the experiences of mind

Textbook learning and problem-solving process

  • Question 1: abstract class abstract method is what role?
  • Question 1 solution: an abstract class represents a general concept, there are some methods that are not declared, for subclasses override. Abstract method provides a method signature, they are inherited by subclasses.
  • Question 2: the role of the reserved word super what are?
  • Problem 2 Solution: You can use super to call the parent class constructor, you can also enter the instance data and methods of the parent class (regardless of whether or not hidden) references

Code debugging and problem solving in the process

  • Question 1: XXXXXX
  • Problem 1 Solution: XXXXXX
  • Question 2: XXXXXX
  • Problem 2 Solution: XXXXXX
  • ...

Code hosting

(Run results screenshot statistics.sh script)

Last week exam wrong question summary

  • Abstract methods are used when defining
    • A .interface classes
    • D .arrays
    • E .classes that have no methods
    • An interface is a class that has defined some of its components, but leaves other components (methods) for you to implement. So, these components (methods) are referred to as abstract and defined in the interface class as abstract.
    • Understanding: all abstract methods of the parent class to be rewritten, that is, let us realize the interface method, rather than no method
  • Which of the following is true regarding Java classes?
    • A .All classes must have 1 parent but may have any number of children (derived or extended) classes
    • E .All classes can have either 0 or 1 parent class and any number of children (derived or extended) classes
    • Further, since all Java classes inherit either directly or indirectly from the Object class, all Java classes have exactly 1 parent class.
    • Understand: java class with the Object class has a direct view of the relationship, so each class has a parent class, Object class that own it? Object is the parent of all classes, as well as its own
  • A variable declared to be of one class can later reference an extended class of that class. This variable is known as
    • D .polymorphic
    • The term polymorphic means that the variable can have many forms. Under ordinary circumstances, Java is strongly defined that is, a variable, once declared to be of a type, can never change to be of a different type. The exception to this is that polymorphic variables can be any type of derived class (although not at the same time, the variable can change from one type to another).
    • Understanding: Chapter IX
  • In order to determine the type that a polymorphic variable refers to, the decision is made
    • by the Java run-time environment at run time
    • The polymorphic variable can take on many different types, but it is not know which type it has taken on until the program is executing. At the time the variable is referenced, then the decision must be made. That decision is made by the run-time environment based on the latest assignment of the variable.
    • Understanding: Chapter IX
  • Using the reserved word, super, one can
    • A .access a parent class'constructor(s)
    • B . access a parent class'methods and instance data
    • E .none of the above
    • The super reserved word provides a mechanism for accessing a parent class'methods and instance data (whether or not they are hidden). In addition, a parent class'constructor(s) may be accessed using super. So the correct answer is the combination of A and B which isn't an option so the correct answer is E.
    • Understanding: In fact, both can also be called abstract methods of the parent class constructor and instance data
  • Interface classes cannot be extended but classes that implement interfaces can be extended.
    • B .false
    • Any class can be extended whether it is an interface, implements an interface, or neither. The only exception to this is if the class is explicitly modified with the word "final" in which case it cannot be extended.
    • Appreciated: the interface can also be extended, not only the front band-final.
  • If class AParentClass has a protected instance data x, and AChildClass is a derived class of AParentClass, then AChildClass can access x but can not redefine x to be a different type.
    • B .false
    • A derived class can redefine any of the instance data or methods of the parent class. The parent class'version is now hidden, but can be accessed through the use of super, as in super.x.
    • Understand: You can change the data type of x with super
  • You may use the super reserved word to access a parent class'private members.
    • 理解:Super will allow access to all non-private members of a parent class but, not to the private ones.

Pair peer review and

Grading

  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:
    • Hair blog before Friday 1 point
    • 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
  7. Points:
    • Plagiarism buckle to 0
    • Cheat codes to buckle 0
    • Late assignments to buckle 0

Comments template:

  • Worth learning problems or blog:
    • xxx
    • xxx
    • ...
  • Code is worth learning or problem:
    • xxx
    • xxx
    • ...
  • Based on score, I give this blog Rate: XX points. Score as follows: xxx

  • Reference Example

Comments had students blog and code

Other (perception, thinking, etc., optional)

xxx
xxx

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
fifth week 1600/2900 2/11 20/110
Sixth Week 981 /3881 2/12 25/135
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: XX hours

  • The actual study time: XX 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/acgacg/p/11681932.html