Java and UML object-oriented programming Abstract

Source: Internet
Author: User

I. Object
Object found

Check the object's Responsibilities

CRC-responsibilities-collaboration

Determine the object hierarchy

Object Property found

Object operations discovered

2. Design Guide
1. Overall understanding

2. Encapsulation
Maximize encapsulation minimize coupling isolation Gui

3. Design
Class must have a purpose and have their own responsibilities

A class has good properties: defines some operations for other classes, or uses itself as a structure for other classes.

Association and inheritance

Class cannot do anything: do not make a class too big

4. Inheritance
Is a test: All tests must pass the is a test to ensure that the base class can be transformed upwards by the quilt class.

Move properties and operations up as much as possible: common methods and Properties

Do not move attributes and methods too high: Do not put non-common attributes in the superclass.

Discover superclass

Iii. General Guide
Important name

One thing at a time

Don't re-invent the wheel

Not once

Simplicity

Your software will not disappear

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.