2019-2020-26 "data structures and object-oriented programming," the second and third week learning summary

2019-2020-26 "data structures and object-oriented programming," the second and third week learning summary

Learning content summary

  • Chapter two:
  1. Learn string (String class)
  2. Learning a variety of variables and operators.
  • third chapter:
  1. Learning classes and objects.
  2. Learn more about the Scanner class, String class, Random class, use the Math class.
  3. Learn the formatted output.

Textbook learning and problem-solving process

  • Question 1: Why can not the new operator when programming?
  • Problem 1 Solution: String frequently use, you can use
String str = "string";

[Managed code]

Last week exam wrong question summary

  • Wrong question 1:
    the If you want to the Output at The text "hi there", Including at The quote Marks, of Which at The following could do that (if you want to output text "hi there", including the quotation marks, which of the following statements do? to a)?
    A .System.out.println ( "Hi there");
    B .System.out.println ( "" Hi there "");
    C .System.out.println ( "" Hi there ");
    D. System.out.println ( "" Hi there "");
    E .none, IT IS A output not possible to quote Because IT IS Used to Mark The Mark The Beginning and Ending of BE to output String (no, not possible to output quotes , because it is used to mark the beginning and end of a string)
    Analysis: "an escape sequence is used to place characters in the string, so it is used here, and outputs the rest of the quoted string.
  • Wrong question 2: Of the following types, which one can not store a numeric value ( in the following data types, which can not store a data type value?)?
    A .int
    B .byte
    C .float
    D .char
    E .all of these can store numeric values (all of the above types can store numerical data)
    parsing: int and for storing byte integer (integer), float for storing floating-point values or real (a value with a decimal point). Character to store a single character, including letters, punctuation and numbers. However, the storage number "5" and 5 different digital storage.
  • Wrong question 3:? What value will z have if we execute the following assignment statement float z = 5/10; (? If we execute the following assignment statement, is what will get the z value)
    A .z by Will equal is 0.0 ( z equal to 0.0)
    B .Z will equal 0.5 (z will be equal to 0.5)
    C .Z will equal 5.0 (z will be equal to 5.0)
    D will equal .Z 0.05 (z will be equal to 0.05)
    E .none of the above, RUN A -time error arises because z is a float and 5/10 is an int ( none of the above, since z is a float type, 5/10 is of type int error occurs when it runs)
    Analysis: int values are 5 and 10 Therefore 5/10 is integer division. The result is zero. Even if z is a floating point, and may store the real answer, 0.5, only to give 0 as integer division. 0.5 In order to obtain, we must first 5 or 10 as a floating point number.
  • Wrong question 4: A cast is required in which of the following situations ( Which of the following need to cast?)?
    A .using charAt to the Take A String AN Element of IT and Store in A char (using charAt to get the string elements and stores it as char type)
    B a float in .storing AN int (int type to a number storage type float)
    C .storing a double float in a (a float type number storage type double)
    D. storing a float in an int (a float type number storage type int)
    E the above .all of the require casts (All of the above are required cast)
    Analysis: for a, charat returns a char, there is no problem. In B and C, the situation is the use of a narrower type of extended operation, and stores the value in a wider type. Only in the d, appear types are stored in the broader narrower types, it is necessary to cast.
  • Wrong question 5: If x is an int and y is a float, all of the following are legal except which assignment statement ( if x is an int, y is the number of a float, all of the following assignment statement Which? illegal)?
    A .y = X;
    B .x = Y;
    C .y = (a float) X;
    D .x = (int) Y;
    E The above are .all of legal (valid above all)
    Analysis: Since X is an int, unless it is converted to floating-point int, otherwise it can not be removed floating point. In assignment B is not explicitly thrown, A is not needed, since the floating point (y) int acceptable value (X), and in c and d, so that they explicitly thrown legitimate.
  • Wrong question 6: Assume that x, y, and z are all integers (int) equal to 50, 20, and 6 respectively What is the result of x / y / z ( assuming that x, y and z are integers.? number (int), 50,20 and 6 are equal then the result of x / y / z what?)
    a .0
    B .12
    C .16
    D II.A syntax error the this AS iS syntactically invalid (invalid syntax generated due syntax error)
    E II.A, rUN-time error Because the this iS a division by 0 (except due to run-time errors generated 0)
    Analysis: this segmentation is performed from left to right, so before executing 50/20. Since 50 and 20 are integers, the result is two. Next, 2/6, that is 0. Please note that if right-to-left divide, the evaluation result will be 50 / (20/6) = 50/3 = 16.

Pair peer review and

20182301

Grading

  1. Proper use Markdown syntax (1 point):
  2. Elements range (1 point) template
  3. Textbook learning and problem solving process, a problem 1 point
    • Add 5 points
  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

Comment:

  • Worth learning problems or blog:
    • Thinking multi-faceted textbook, code.
    • Seriously looking for their own shortcomings.
    • Illustrate the problem.
  • Code is worth learning or problem:
  • Based on score, I give this blog scoring: 14 points. Scores are as follows:
    • Feelings, experience does not leave large empty 1 point
    • Typesetting fine plus one point
    • Pair learning authentic plus 1 point
    • Proper use Markdown syntax
    • Elements range (1 point) template
    • Learning the wrong questions in depth, add 1 point
    • Comments seriously, I can point out problems and blog code plus 1 point
    • Textbook learning and problem-solving process, add 5 points
    • The code debugging and problem solving process, plus 2 points

Comments had students blog and code

  • Pair this week learning
  • Last week blog peer assessment case

Other (sentiment)

More profound understanding of the Java language. I learned to apply a few basic classes.

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 26/200 2/2 7/7
The second three weeks 3/5 15/23
  • The actual study time: 15 hours

Reference material

Guess you like

Origin www.cnblogs.com/20182326lyj/p/11568776.html