Java beginner's feelings and experiences

0. Introduction

Since learning java, we have been training three times pta jobs. Although the completion of each job have encountered little difficulties and obstacles, not easy, but through their own exploration, practice, always finish the job requirements, we have a different harvest after each job. These new harvest tells me, practice makes perfect, hands will learn more things. Summary previous three jobs, I found that this object-oriented programming language is no longer so mysterious, I believe'll be able to see it unveiled after the.

==========================================================================================================================================

1. The operation procedure summary

(1) Summary of knowledge iterative relationship three jobs

The first job is to practice the type of use java, and some simple syntax. The main purpose is to let our skilled use of the basic operation of java, and lay a solid foundation for the subsequent exercises. By first job, mainly mastered the java type of use, input and output operations, initially the input operation is not familiar with. The second job is certainly more difficult than the first job has increased, most intuitive feeling is that an increase in the amount of code, but also questions Solve a problem, began to demand method, but not all things are not written in the main tricks inside. Use is a major feature of java, it must be required to master. The third work is obviously more difficult and increased the degree of difficulty of the job is always on the rise in the state, so as to be effectively improved. The requirements of the job is to write another class and implement a variety of ways. Really stumped me, but was achieved through exploration. Use the java class entry, because the program is to use java classes of. These three operations are iterative relationship knowledge of java: First job: master the basic grammar java and type, as well as input and output operations -> Second Job: java grasp of the method used, as well as slightly more complex calculation -> third operation: use master the use of java classes and a variety of methods, use the new operator to create an object of a class, thus using the object method call to the function class. These are a once progressive, after each job is completed will be one step closer from the real java, but also gradually began to feel object-oriented programming features.

(2) How the gradual transition from the process by the object-oriented operations-oriented

Work through a number of specific requirements, let us learn java usage. The first job, felt the difference between process-oriented and object-oriented from the input and output, the second job is to learn to use the method, the third job, you learned in java classes and methods, these are the jobs provided transition from object-oriented to process-oriented.

(3) The problem encountered during operation and solutions

Question 1: Analyzing isosceles right triangle test point is determined in a triangle job types embarrass

Solution: try a lot of sets of data, we found that some expected data is not the same, there is the original computer precision, and the two right-angled isosceles right triangle sides are irrational numbers, can not easily use the Pythagorean theorem to determine, to use precision Analyzing specification isosceles right triangle.

Question 2: The number of jobs in a statistical maximum number appears in the end to fix 0

Solution: At first I was using while (integer input and the input 0 to end), the result of procedural error, an idea behind the change, and to enter the input integer 0 on end while inside it.

Problem 3: Job two linear equations and seek root output when 0 is -0

Solution: When the root is zero, directly control the output 0

Question 4: The class dates class II design work specified in the return type of class, do not know how to return.

Solution: like a long time, trying a variety of methods, suddenly tried a success. The original return type is to use this new class to an object, the parameter change spread out, returns an object of this class.

Problem 5: The class Job class II date specified in the design of the return type String

Solution: also try out, practice makes perfect, direct return date on it.

(4) The time spent in each job ratio

Is about 1: 2: 3, with the increasing difficulty of the job, the more time spent.

(5) Recognizing and lessons of rigor of the programming process

java programming is extremely rigorous, not a trace of error, would rather sacrifice its flexibility but also to ensure its stability. I once java compiler in the name of the class named Test, the result has been an error, but could not find a program error, Xiangponaodai also do not understand, then ask someone, be someone encountered a similar problem my dear friend gave away the original java class which has been implicitly defined a Test class, we will define a compiler confusion, and finally I changed the class name, and she can run. What a careless move, round loser. A new broom, sweeps clean, no punctuation can not go wrong.

==========================================================================================================================================

2.OO Design experience

(1) Comparison of process-oriented and object-oriented

Process-oriented and object-oriented What is the difference, at first I was not very clear. Through this operation three times, I found the difference. First of all process-oriented implementation is mainly using the function, there is no restriction between function, you can call each other, learn java future, I feel calling this function more chaos, no tricks. The object-oriented is different, object-oriented implementation is the main class, where the class which also contains methods and properties, there is a clearer framework, through the use of the class is the object, not directly be used for this and process are apparently different. Object-oriented class that can have multiple objects to use the class in a variety of methods and properties through the object, it is more close to the reality of our operating environment, because we are in real life, too, like all people, but people with people have different characteristics, it can not be called the same object. java where you can use objects to solve individual differences. These are process-oriented and object-oriented I understand.

(2) Basic principles of object-oriented design appreciated

java is composed of classes, the class and consists of methods and properties, object-oriented means that all operations java are operated by objects, methods, and properties that only objects can use the class, which is the object-oriented thinking, different objects You can use different methods and properties required of their own, just as we like people, what they need.

Understand (3) .OO programming thinking

Control operation by the object, object-oriented programming, a method which defines the class properties, the object is invoked. java characteristics: encapsulation, inheritance, polymorphism.

==========================================================================================================================================

3. understand and practice tests

(1) Testing the importance of encoding quality

For everyone else, as the doctors test for java program, check where there are loopholes, this program meets the design requirements, to achieve the desired effect, how robust the program.

(2). If you make design test cases, how would you do

I will not flood testing, but the first observation program, that program in place which loopholes, and then test the point, let the program test boundaries and special boundaries, limit testing, and functional testing, let the program robust as possible.

==========================================================================================================================================

4. Course harvest

Job training through this three times, I thought I knew regarded java object-oriented programming language that is how it is, and know how to write java program, you know the general structure of java.

==========================================================================================================================================

 

5. Recommendations of the curriculum

We are hoping to learn more knowledge of java.

==========================================================================================================================================

6. The next study plan

Continue to complete the job java, java learning to expand as much as possible, you can find some topics to practice, to practice their own hands more, to make up for deficiencies.

Guess you like

Origin www.cnblogs.com/l-yy/p/12635248.html