Java+ on the object-oriented beginner's thoughts

Source: Internet
Author: User

I never contacted before the pilot class .Cand thePythonoutside of the language, in the freshman year's curriculum, with the process-oriented method of thinking enough to complete the vast majority of curriculum requirements, so I also have little knowledge of object-oriented programming ideas, although many have heard but it has not been a formal learning to understand nor any intuitive experience. Therefore, in the first section of the pilot class, the first time really to understand the object-oriented thinking is very fresh or even a bit of awe. and forJava, in the class before the heart is actually a little afraid of, after allSome code is moreClanguage is more than a dozen words (System.out.println ....),but after the first class, ItheJavathe degree of goodwillIt's been raised a lot.,The programming method of constructing program by class and class method makes me seem to open the field of vision all at once, plusJavamany of its own methods are very convenient to use, and in the course you can gradually experience theJavawriting code is a very interesting process.

The first homework my program bug very much, can debug Completion degree said is very low ... Most of the test points did not pass, one of the most serious problem is that a total of A test point, the program output to the first 6 does not output,MyTest Inside the tearDown method also did not carry out, Although the output of the 6 test points seem to have passed (in the course of testing when the test point output can not understand possible discrepancies ...) ), but this output to the sixth point of the problem is not resolved to rush to the next class to go ... Look again today, found in

The Myinsert method of the CharSet class adds a line to the code that ends the run after judging the character already exists, why did you add this line at that time? I can't remember what I thought at the moment ... In the next few assignments there are still a lot of such bugs, redundant operations and so on, no special record of value, I do not specifically write down here ...

The second homework in the class test situation is also the same miserable, a piece of it, I in the process of debugging Another error occurred ,

This error means ' cannot instantiate class ', possible reasons are: first, the constructor of the class is private, but my constructor is public, exclude; , this class is abstract class, see here I think of, before there is such an error:

I did not think much, also made lazy no further research, directly double-click on the second option, the Stringset became an abstract class and learned one lesson: Don't be spoiled by Eclipse ! Although Eclipse has provided us with many of these conveniences, we must not misuse these quick fixesfor the sake of our most unfamiliar novices, We should use this information to study exactly where it is, in addition to being wrong, and not being lazy.

then again, here we are, we are Stringset is missing some of the methods of the interface it belongs to, which one is it? Fortunately, only three abstract methods in the interface, quickly found the problem, in the stringsetinterface

,the parameter of the Find method is an Object, however the find in Stringset The parameter of the method is a String, so these two methods will be considered two different methods, change the parameters to the same, this is the lesson two.

Next is the third homework, the third homework is the word frequency statistics, in this semester's C Language and data structure we have written this problem in C, but my course is very poor-it also directly leads me not to use a faster sorting algorithm to improve performance, in addition, my program has a lot of non-standard places, For example, the position of the record, and the expression of the word, because I was trying to read the words in the same order, so I want to read the words, and then use a arraylist<character> to store the words, but in the call . The ToString () method will output strange things,

When I write the fourth time I will read the method into the whole line read into the processing string.

I can only use my own method on the algorithm of sorting and so on, and I have not learned in the course of this semester how to find sorting algorithms like trees ... are tutoring.

But in this class, there is a further understanding of how to improve the performance, but also some gains.

to the fourth time is the last homework, through the previous three trial and error and accumulation, the process of writing code unexpectedly smooth, almost no place to be stuck, the main difficulty is in HashMap The use of it, understand HashMap,Entry , etc. took me some time, but finally also successfully completed the work.

after four classes of training and accumulation, can obviously feel their own use Java proficiency has increased, but also exposed a lot of deficiencies, a large part of which can be said by the lack of exercise this semester, will be in the programming process there are a lot of small but harmful errors, there are obvious redundant places, at the same time, One of the reasons that productivity has improved a lot from the first to the last job is to make better use of the search engine in the last job, the Java Proficiency is not high enough, and the Java There are many convenient methods can greatly improve the efficiency of programming, these can not be afraid of trouble constantly to the search engine "fools", which is also a link to learning.

this summer semester of the object-oriented pilot class is my first contact with the "training camp" form of the course, in the classroom has its own hands-on time, do not have to try as usual in the classroom will cause the distraction of lectures, in the classroom immediately hands-on writing to see, the faster. Especially for me personally, although as a regular progress too slow, the members of the drag, the pressure is not small, but the classroom atmosphere can make me very involved. The difficulty of the classroom practice for me is also relatively moderate, although I belong to the foundation of poor students, but the number of classes less, practice time is also very sufficient, whether it is to the teacher teaching assistants, or the classmates around to ask, can all get enough answer resources, so in the classroom learning efficiency is very high.

If there is any place let me feel can't keep up, is in the class test time, of course, this and my homework writing too bad also have a relationship, the class under the completion of the good students will soon be able to test, and then do their own things, such as my death-throes classmates. Although the quality of individual students to complete the work can not be controlled, but if the job requirements on the input and output have more stringent standard description or a sample may be able to shorten the overall test time.

In general, although the object-oriented class we learned from the elder sister heard is extremely scary, but this pilot course of learning experience is very happy, but also thank teachers and teaching assistants to pay ~

Java+ on the object-oriented beginner's thoughts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.