一、语义上:
关联关系:
A has a(knows a) B
依赖关系:
A uses a B
二、代码上:
关联关系:
package facade;
/**
* @author Administrator
* @version 1.0
* @created 11-十月-2015 18:42:05
*/
public class A {
public B m_B;
public A(){
}
public void finalize() throws Throwable {
}
}
依赖关系:
package facade;
/**
* @author Administrator
* @version 1.0
* @created 11-十月-2015 18:44:06
*/
public class A {
public A(){
}
public void finalize() throws Throwable {
}
/**
*
* @param obj
*/
public int process(B & obj){
return 0;
}
}
时间: 2024-10-05 23:56:25