日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

第四章,简答题4-5,2017-4-6

發布時間:2025/5/22 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 第四章,简答题4-5,2017-4-6 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

巫師屬性類-------

1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace 第四章_簡答題5.entity 8 { 9 public class Wus 10 { 11 public int SM { get; set; }//生命 12 public int Do { get; set; }//戰斗值 13 public int ji { get; set; }//級別 14 /// <summary> 15 /// 默認巫師生命值 16 /// </summary> 17 public Wus() 18 { 19 SM = 10000; 20 } 21 /// <summary> 22 /// 巫師屬性 23 /// </summary> 24 public Wus(int Sm,int DO,int Ji) 25 { 26 this.SM = Sm; 27 this.Do = DO; 28 this.ji = Ji; 29 } 30 /// <summary> 31 /// 顯示巫師屬性 32 /// </summary> 33 public void SayHi() 34 { 35 Console.WriteLine("巫師生命值是:"+this.SM+"戰斗值是:"+this.Do+"級別:"+this.ji); 36 } 37 38 } 39 }

?

巫師Main----

1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 using 第四章_簡答題5.entity; 7 8 namespace 第四章_簡答題5 9 { 10 class Program 11 { 12 static void Main(string[] args) 13 { 14 Wus w=new Wus(200000,5000,30); 15 w.SayHi(); 16 } 17 } 18 }

?

?

螞蟻類--------

1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace 第四章_簡答題4.entity 8 { 9 public class ming 10 { 11 public string name { get; set; } 12 13 public ming(string Name) 14 { 15 this.name = Name; 16 } 17 public void SayHia() 18 { 19 Console.WriteLine("我是:"+this.name); 20 } 21 } 22 } 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace 第四章_簡答題4.entity 8 { 9 public class tian 10 { 11 public string name { get; set; } 12 public int count { get; set; } 13 public tian(string Name,int Count) 14 { 15 this.name = Name; 16 this.count = Count; 17 18 } 19 20 public void SayHi() 21 { 22 Console.WriteLine("我找到一塊甜品:"+this.name); 23 Console.WriteLine("我呼叫到"+this.count+"小伙伴"); 24 25 } 26 } 27 }

?

螞蟻main--------

1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 using 第四章_簡答題4.entity; 7 8 namespace 第四章_簡答題4 9 { 10 class Program 11 { 12 static void Main(string[] args) 13 { 14 ming m = new ming("小不點"); 15 m.SayHia(); 16 tian t = new tian("hhh", 2); 17 t.SayHi(); 18 Console.WriteLine("現在,大家搬家遠甜品!"); 19 Console.WriteLine("我們完成尋找甜品的任務!"); 20 } 21 } 22 }

?

轉載于:https://www.cnblogs.com/yjjh/p/6676043.html

總結

以上是生活随笔為你收集整理的第四章,简答题4-5,2017-4-6的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。