Java 简易框架

interface B{
	
	 void test1();
	 void test2();
	
}
abstract class A implements B{
	
	A(){
		
		System.out.println("A 构造函数");
		
	}
	
	void A_test()
	{
		test1();
		test2();
	}
			
}


class Person extends A{
	
	Person()
	{
		System.out.println("Person 构造函数");
	}
	
	public 	void test1()
		{
			System.out.println("Person test1");
		}
	public     void test2(){
			System.out.println("Person test2");
		}
	
}


class Entrance {
	
	public static void main(String[] args)
	{
		
		
		Person person =new Person();
		person.A_test();
		
	}
	
}

  

  以上的框架,留出可以实现的方法test1 和 test2   交给实际的应用 ,实现程序的调理性

要有韧性
原文地址:https://www.cnblogs.com/niuxiaojie521/p/14779949.html