`

has a ,is a use a

    博客分类:
  • rose
 
阅读更多

类的关系为:

is-a:

has-a:

use-a:

is-a 为继承,或实现,

has-a 为组合或聚集

use-a为使用。

类解释:

public class A {
          B  b = new B();
          void dummyMethod() {
             .....
          }
        }



public class A{
             void dummyMethod() {
                B b = new B();
                b.doSomething();
                ....
              }
       }

 

  • 大小: 60.1 KB
分享到:
评论

相关推荐

    Python 3.7 is a programming language

    IPython is a powerful interactive shell that features easy editing and recording of a work session, and supports visualizations and parallel computing. The Software Carpentry Course teaches basic ...

    A First Course in Mathematical Analysis.pdf

    A First Course in Mathematical Analysis Mathematical Analysis (often called Advanced Calculus) is ... It is suitable for self study or use in parallel with a standard university course on the subject.

    170: Warning: (1681, ‘Integer display width is deprecated and will be removed in a future release.’)

    在Python的数据库操作中,尤其是当你使用pymysql库连接MySQL数据库时,可能会遇到一个警告,提示"Integer display width is deprecated and will be removed in a future release." 这个警告源于MySQL数据库的一个...

    Delphi in a Nutshell

    With a new name and a new focus on CORBA, database drivers, and Microsoft Back Office applications, Inprise/Borland Delphi is enjoying a resurgence, with a growing user base of programmers who use ...

    A Little Java, A Few Patterns

    Java is a new object-oriented programming language that was developed by Sun Microsystems for programming the Internet and intelligent appliances. In a very short time it has become one of the most ...

    S7A驱动720版本

    in the demo mode, or the value 1, when the driver has found a valid key, and therefore is licenced. This function is also available via the OPC server interface. The same item-ID address format has...

    A Practical Guide to Designing for the Web.pdf

    Modern web design is a discipline that spans a huge range of skills. Often though, the wider the span, the thinner the knowledge. That needs to change. Graphic design has such a rich, and useful ...

    a project model for the FreeBSD Project.7z

    However, Niels Jørgenssen has suggested a model of how written code is integrated into the project. Figure 4-1. Jørgenssen's model for change integration The “development release” is the ...

    C# 7.0 in A Nutshell

    Organized around concepts and use cases, this updated edition provides intermediate and advanced programmers with a concise map of C# and .NET knowledge. Dive in and discover why this Nutshell guide ...

    a算法演示

    This is a simple A* (A-Star) implementation. I did this for one of my university projects, so don‘ t expect it would be very good. Anyway, it‘s very simple because I ‘m not a C# programmer. ...

    This Is a Demo

    This is useless, and has no use to anyone

    A Introductory statistics with R2.

    as the receiver has the same rights and the source code is freely available. It exists for MicrosoftWindows 95 or later, for a variety of Unix and Linux platforms, and for the Apple Macintosh (OS ...

    HuffCode.zip_The D.A._huffman data matlab

    The term refers to the use of a variable-length code table for encoding a source symbol (such as a character in a file) where the variable-length code table has been derived in a particular way based...

    职称英语理工类A级历年真题及答案

    13. **题目:** It has been said that the Acts provided a new course of action and did not merely regulate or enlarge an old one. - A. limit (限制) - B. control (控制) - C. replace (替换) - D. ...

    计算机网络第六版答案

    First, the content provider has more control over the user experience, since it has to use few intermediary ISPs. Second, it can save money by sending less traffic into provider networks. Third, if ...

    JSP Simple Examples

    We use the if condition to check if the particular condition is true then it should perform a certain task, and if a particular condition is not true then it should do some other tasks. ...

    Electronics: A Systems Approach (3rd Edition)

    (It also has a separate conventional section on digital electronics so it does not have an integrated approach in that regard despite statements to the contrary). This is a decent book but I'm ...

    Firefox Optimizer 2009

    Would you use a program that would reduce the memory usage of Firefox to 100-200 Kilobyte ? I have no idea how the Firefox Ultimate Optimizer is reducing the memory usage to this amount but the task ...

Global site tag (gtag.js) - Google Analytics