C + + Programming-Object oriented

Source: Internet
Author: User

1-1 Object-oriented research variables are also objectdata:the properties  or status; The is the Coreoperations:the functions services available to the lamp to power on or without power.                          mapproblem-------- ------Solution Space object  oriented (00) is a thought of organization   design and realization (designs&implementations)  2-2    Object-oriented basic conceptual objects Exchange information through message object send messages messages is composed by the sender interpreted by the receiver Implemented by the methods Messages could cause receiver to change state may return the Result object vs. Class Object (cat)       represent things,events, or concepts      Respond to message at Run-time Class (Cat Class) Define properties of instances      ACT like types in C++ oop characte  Ristics 1.Evertything is an OBJETCT.  2.A program was A bunch of objects telling each of the other "do by sending messages. 3.Each Object has it own memory make up to other Objects.  4.Every object has a type. 5.All objects of a particular type can receive the same Messages. an object have an interface the interface is the WA  Y it receives messages. It is defined in the class the object belong To. functions of the interface if there is an excuse, then it is convenient to exchange other things, make in the program can removable things coupling-cohesion  , the coupling is the most we want to do.  Communication: Communicate with the outside world. Protection, if there is an excuse, you can protect the internal implementations, outside the excuse is still unchanged.  the Hidden Implementation (hidden implementations) Inner part of a object, data members to present their state, and the actions it take s when messages are Rcvd is hidden.  Class creators Vs. Client Programmers-keep client Programmer ' s hand off portions they should not touch. -allow the class creators to change the interval working of the class without    worrying how it'll affect The client programmers. encapsulation (package) bundle data and methods dealing with these data together in an object Hid  E The details of the data and action. Restrict only access to the publicized methods.

C + + Programming-object-oriented

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.