Interfaces pass parameters in the two parts, the traditional programming are the internal type or of the specific structure of what,
In object-oriented programming, implementation, and call interface is a class, is a user-defined data types,
This is called an abstract?
CodePudding user response:
If you want to learn object oriented, it is suggested that under the learning JavaOr buy a book "design patterns" read
Process oriented and object oriented
are not the same thoughtProcess oriented is the one thing that is divided into n steps, step by step to achieve it (soho)
Object-oriented is different, it is divided into n module, interaction between modules to complete something (the company)
CodePudding user response:
"Is this a user-defined data type" ridiculously wrongObject oriented is not so magical, can put all the code as unified as data types, and it is not necessary
Object-oriented is based on the limitations of the human brain, the brain up to sort out at the same time the relationship between the seven events
Process oriented is the boss tube, what all do
Object oriented just as company President, only manage the following vice President, understand?
They like the pyramid structure
CodePudding user response:
Object oriented is the most important feature of "packaging",Inheritance is not independent, inheritance and interfaces to watch to be meaningful
Inheritance is to do constraint, constraint the behavior of the subclass
Process oriented is the thought of what, do what, didn't planning process, so the maintenance program is the pain
Object-oriented each module clear responsibilities, easy to maintain and read
CodePudding user response:
Class is the language level, in c + +, you class A {}; This is a class, it is a set of specific function, level of abstraction is method, to solve a complex problem, I'll put this problem abstraction, despite what things on the level of detail, from the top throughout the global, or in order to provide more flexibility, abstract to concrete implementation in the language level, through the class to achieve (virtual function),CodePudding user response:
Clear, thanks,Top-down process oriented programming, because is concrete, the top-level code is very easy, through structure design, control the underlying code, let boundaries become blurred,
And bottom-up object-oriented program design, first the default module, provide an abstract interface, as far as possible to avoid mutual interference in form,
In fact, the abstract is not exclusive to object-oriented programming, procedure-oriented programming can also be the problem abstraction,
Class is only a programming technology, abstract the problem into a class, is to use this technology to solve the problem,
When one day with other programming concepts, assuming that called "group", also need the specific issues, the abstract into a solution,
CodePudding user response:
Yes, object-oriented and language has nothing to do, just a thought, like c language can also write object oriented code!And design patterns you see after, you remember there are many wrong things, there are many theory is wrong!
Code is essentially in order to solve the problem, and not forced to use, and most is forced to use design patterns of
https://blog.csdn.net/fishmai/article/details/52079766
Very good links above mentioned in article 2
Object-oriented is to encapsulate and normalization, other than for the purpose of this is play rascal,
Like play rascal of the decorator pattern in Java!!!!!!
CodePudding user response:
Like inside of object-oriented code reuse, but a few people actually capability can reach to design a set of framework can be reused very well?The great god, after all, is one of the few?
So the inheritance is to reuse code that is the biggest trap in the object-oriented!
Inheritance if not for polymorphism, will bring a lot of mental burden!
CodePudding user response:
Actually see so many swimming video, than to go swimming the waterWhen the building Lord accept ten lines of code, and then to experience the difference between procedural and object-oriented
CodePudding user response:
"Abstract" is playing an elephant with a whip,CodePudding user response:
Process oriented programming "process" (procedure) refers to the function (in computer language, function, procedure, routine/subroutine basic is the same thing), not the development process, has nothing to do with modular not modular (modular is a kind of development method, belongs to the field of software engineering, has nothing to do with language types, Dijkstra in structured programming method is put forward by the 1969) with modular design for the core, actual it is the traditional structured programming and the comparison of object-oriented programming, simply be procedural language such as C, Pascal programming and object oriented programming language difference isThe biggest advantages of object-oriented programming can better manifest the principle of information hiding, can put the code and operation of data encapsulation together (" packaging "is one of the three major characteristics of object oriented), improve the independence of the module, high cohesion and low coupling is the basic requirement of software engineering, whether using procedural programming or object oriented programming, just object-oriented programming can do better than