No.20169204 <Mobile Platform Development and Practice> Learning Summary , Second Week
No.20169204 Learning Summary, Second Week
Summary of Teaching Content
-Object and Class
Object-oriented programming(OOP)works by modeling applications on real-world objects. Then, What are the object and class? Maybe we can give a specific example: Last week, Mr.Lou and Mr.Wang praised me for my a English bolg, thus, in order to reward me, Mr.Lou will decide to buy a mobile phone to me. In this time, we can see the mobile phone as a class. When Mr.Lou asked me what I wanted, my answer is I'd love to have a iphone 7. This moment, we can see the iphone 7 as a object. Every class may have some different properties and methods,also some similarities like different phone have different
Configuration and function.Understand the core concepts,we can get the knowledge easily.
This chapter is very important,the following is a simple implementation of a class and object:
In addition, we need to understand the use of some key words,such as 'this','null','final', as well as the constructor, which can be easily learned in the textbook.
-Inheritance
Inheritance is a very important object-oriented programming(OOP)feature. It is what makes code extensible in an OOP language. Extending a class is also called inheriting or subclassing. In java,by default all calsses are extendible,but you can use the final keyword to prevent classes are extendible,but you can use the final keyword to prevent classes frome being subclassed. The concept of inheritance is the relationship,"is a". Like precious chapter,we can give a specific example: The dog is an animal. It is easy to know that dogs inherited the characteristics of animals,also the dog must be an animal,but animals are not necessarily dogs.
-Interfaces and Abstract Classes
While the Class is a concrete realization, Interfaces define some class what they are following. Interfaces don't care anything but order the classes must be can do some specific work,or the classes have soem specific methods.
Technically speaking, an abstractclass is a class that cannot be instantiated and must be implemented by a subclass. However, the abstract class is important because in some situations it can take the role of the interface.
-Polymorphism
Polymorphism is the hardest concept to explain to me to object-oriented programming (OOP). Objects have a variety of forms,Contains two aspects:
-1. References Polymorphism
Parents' reference can point to itselves' object;
Parents' reference can point to subclass' object.
Don't want to say much,let's go to the code world.
Let's see the code of the named "Initail.java" file:
-2. Methods Polymorphism
When you create an object of this class, the method is called the;
When a subclass object is created, the method to be called is overridden by a subclass or inherited method.
Don't want to say much,let's go to the code world.
Problems and Solutions in Teaching Materials
None.
Problems and Solutions in Code Debugging
- javac Telephone.java : Compile through, java Telephone : error
- Recall to the source code
When Annotate the package,this program runs successfully!
Code hosting
-
Code Submission Process Screenshot:
- run git log --pretty=format:"%h - %an, %cd : %s"
- run git log --pretty=format:"%h - %an, %cd : %s"
-
The Number of Code Screenshot:
- run find src -name "*.java" | xargs cat | grep -v ^$ | wc -l
- run find src -name "*.java" | xargs cat | grep -v ^$ | wc -l
Sumary of the test last week
In last week's class, I have a small test to be caught off guard. It is a hard time for me, there are so many mistake which I made, and remind me to study hard in this week. Recall the mistakes before, mostly focused on the basic concept of the textbook and the related tutorials not proficient,as to my answer the question that what's the three most popular IDE environment was wrong!
So, this week, I have paid my attention on the textbook, more focus on some basic knowledge, rather than eager to programming. Carefully read the tutorial, the environment is configured accurately, standardized format for the follow-up study to lay a good foundation for the environment.
Feeling
Two weeks later, the learning method is not very skilled, but I am determined according to this method, continue to study, will have unexpected results. In fact,I learned the basic knowledge of Java was so few in past two weeks, far less than to learn programming much past time. This is due to a lack of understanding of the nature of the compiler. After two weeks of exploration and learning, I gradually understand the operation of the Ubuntu skills, but also enjoy the programming to bring a happy mood. I think I'm more interested in programming.
Finally, thanks to my classmates and teachers help in everything! Thank you!
Learning progress bar
| | Code Line | Bolg | time(hour) | growth |
| --------------- 😐 : ----------------- 😐:----------------- 😐: ----------------- 😐: ---- 😐
| Target | 5000 | 15 | 100 | |
| First week | 200/200 | 1/1 | 3/4 | |
| Second week | 300/500 | 1/1 | 3/4 | |
Reference
-
[Java for Android 2nd Edition]
-
[Java Study notes(8th Edition)Learning guidance]
posted on 2017-03-11 19:16 游伟青20169204 阅读(177) 评论(9) 编辑 收藏 举报