abstractemployee.cs

来自「c#设计模式随书源码 c#设计模式随书源码」· CS 代码 · 共 20 行

CS
20
字号
using System;
using System.Collections ;
namespace Composite
{
	/// <summary>
	/// Summary description for AbstractEmployee.
	/// </summary>
	public interface AbstractEmployee  	{
		float getSalary();					//get current salary
		string getName();					//get name
		bool isLeaf();						//true if leaf
		void add(string nm, float salary);	//add subordinate
		void add(AbstractEmployee emp);		//add subordinate
		IEnumerator getSubordinates();		//get subordinates
		AbstractEmployee getChild();		//get child
		float getSalaries();				//get salaries of all 
		AbstractEmployee getBoss();			//get Boss
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?