1 ===================蚂蚁类===============
2 using System;
3 using System.Collections.Generic;
4 using System.Linq;
5 using System.Text;
6 using System.Threading.Tasks;
7
8 namespace KeHouZuYe.entity
9 {
10 /// <summary>
11 /// 蚂蚁类
12 /// </summary>
13 public class ME
14 {
15 public string Name { get; set; }
16
17 public ME(string name)
18 {
19 this.Name = name;
20 }
21 /// <summary>
22 /// 问好
23 /// </summary>
24 public void SayHai()
25 {
26 Console.WriteLine("大家好,我叫"+Name);
27 }
28
29 /// <summary>
30 /// 找甜品
31 /// </summary>
32 public void Tp(Tianpin foop )
33 {
34 Console.WriteLine("我找到一块甜品:"+foop.TpName);
35 }
36 /// <summary>
37 /// 招呼伙伴
38 /// </summary>
39 public void Count(int Count)
40 {
41 Console.WriteLine("我招呼到" + Count + "个伙伴!");
42 }
43 /// <summary>
44 /// 搬运甜品
45 /// </summary>
46 public void Good()
47 {
48 Console.WriteLine("现在,大家开始搬运甜品!");
49 Console.WriteLine("我们完成寻找甜品的任务");
50 Console.WriteLine("按任意键退出------");
51 }
52 }
53 }