Object-oriented Programming (Oop==>object-oriented programming)
OOA: Object-oriented Analysis
OOD: Object-oriented design
OOAD: Object-oriented Analysis and design
What is object-oriented? A way to analyze the problem (enhancing the scalability of the program)
Three main features of object-oriented: encapsulation, inheritance, polymorphism
What is a class? What is an object? What are the differences between classes and objects?
* Classes are molds, create objects for molds, abstract
A class is a data type, a user-defined data type
Class composition: Fields, properties, methods, constructors, etc.
* The object is specific and is a concrete instance of the class. Objects have attributes (features) and methods (behaviors)
* The class contains data (represented by a field) and behavior (represented by a method (function, function) as a piece of code with a name)
Method Override Considerations:
When a subclass overrides a parent class method, the method signature and return value type must be consistent with the parent class, that is, the method name, the return value type, and the parameter list must be consistent. "Access modifiers are also consistent"
"Method signature": Generic refers to the method's "name" + "parameter list" of the method, and does not contain the method return value type
Overview of object-oriented and method rewriting for C # Basic Learning (0702)