1. Introduction to Objects
1.1 Abstract Process
1.1.1, all things are objects.
The 1.1.2 program is where many objects tell each other what to do by sending messages to each other.
1.1.3 Each object is made up of other objects
1.1.4 Each object has a type
1.1.5 all specific types of objects can receive the same message
In general, objects have state, behavior, and identity
1.2 Each object has an interface
1.2.1 Creating abstract data types (classes) is a basic concept in object-oriented programming
The 1.2.2 interface determines which requests the object can perform, and the type determines the interface
1.3 Objects for external service
The purpose of 1.3.1 programming is to create a range of objects that provide the ideal service to solve real-world problems
1.3.2 We can think of objects as providers of services that can help us improve the high cohesion of objects,
At the same time a good object-oriented design, each object is only focused on doing one thing
1.4 Hidden implementations
The purpose of the 1.4.1 client program is to quickly complete the application development of the utility class, and the object of the class library creator is to establish
A class exposes only the necessary parts to the client program and hides other unnecessary parts
1.4.2 access control prevents the client program from accessing the private part of the class library on the one hand, allowing the class library to be
Designer to modify the details inside the class without worrying about whether it will affect the client program
1.4.3 Java The default access rights are internal to the package, and the class can access members of other classes inside the package
1.5 Implementation of reuse
1.5.1 code reuse is the biggest advantage of object-oriented language
1.5.2 New classes can consist of existing classes called combinations, also known as classes that have a containment relationship, just as a car contains an engine
1.5.3 usually we prioritize a combination when creating a new class, because it's simpler and more flexible
1.6 Inheritance
1.6.1 inheritance is the cloning of existing classes and the addition and modification of clones
1.6.2 There are two ways to make your derived class different from the base class, one is to add the method directly in the derived class, and the second is to modify the base class
The behavior of the method, that is, the method of overloading the base class
This article is from the "unwilling to Do" blog, please be sure to keep this source http://bcjian.blog.51cto.com/2448891/1662550
Java Programming thought learning---first day