I know now. Class object interface But I don't know how a project should structure class behavior properties Ask younger brother I should read that book AH ~

Source: Internet
Author: User
I now know the class object interface but I don't know how an item should be structured class behavior properties excuse me, I should read that book.
I now know the class object interface but I don't know how an item should be structured class behavior properties excuse me, I should read that book.



Title ~ ~ is very confusing ~

------Solution--------------------
I think we should look at the relevant books on system design.
------Solution--------------------
The Book of software engineering, especially object-oriented design,
Names that look like "object-oriented programming" can
------Solution--------------------
"In-depth PHP object-oriented, patterns and practices" look 10 times
------Solution--------------------
The teacher drew a circle on the blackboard
The teacher drew a triangle on the blackboard
The teacher drew a circle on the paper
------Solution--------------------
discuss

It's a good one upstairs. Where does this line of paint define

------Solution--------------------
The 4 floor book is not currently recommended because it is not an object-oriented primer. Most OO analysis/design/programming books are written in java/c++, PHP, but not recommended. So, go find the Java book.

Your question on the 7 floor, "Please draw (round) This behavior in the writing should be people, or blackboard ah or round"
My answer is: all can
Because of the "painting" This action, they are all involved in 3 parties, and are indispensable. It can be written on either side of the implementation.
This is what you have to decide during the design phase, and it is possible to change it at the time of refactoring.
Where to put your design is easier to understand, more simple, etc... is better

At the same time, should be in the design of consistency, such as generally should not be "teacher" also has a "painting", "Circle" also has a "be painted",
This is confusing, and probably a duplicate of the code, similarly, if the "circle" has "been painted", "square" should also have a "be painted",
You can then abstract this "painted" into their abstract parent "shape" ....

When you are faced with different needs, you will find that different designs have different feelings and consequences,
So, compared to such a more "virtual" example, you might as well go directly to write a small practical project, (such as a small BBS?)
It's easier to make the requirements concrete, and you can write the actual code, and you'll get a better understanding of it.


  • Related Article

    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.