Object-oriented analysis and design read Note 02

Source: Internet
Author: User

I finished reading the book today and thought it was too good to write. In a simple example, the application of encapsulation is explained in detail. I think this idea can be applied to the Linux operating system design completely. For example, the relationship between NAND MTD and NAND chip info is the concept of encapsulation. Why do you want to disassemble the guitar guitarspec? Because something in Guitarspec is a mutable property in guitar. And what serialnumber is actually not guitarspec innate attribute, is the system artificially added.

The second chapter to the fourth chapter is about how to gather requirement and analysis. The fifth chapter good design, is actually the first chapter to optimize, instrument, Instrument spec (for abstract class) guitar, guitar spec mandolin, mandolin spec equivalent to each additional instrument, I We are going to add two more classes. We can encapsulate the instrument spec again and use a map to represent it. This way we don't need to add two class objects at a time. There is a principle more important, less use of inheritance, multi-use combinations, and sometimes can be delegated instead of inheritance.

Object-oriented analysis and design read Note 02

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.