using System; namespace hw12 { class Program { static void Main(string[] args) { Account[] account = new Account[100]; account[0] = new Account(); account[1] = new Account("Tom", "19900504", Gender.male, Blood.O); account[2] = new Account("Susan", "19890322", Gender.female, Blood.A); account[3] = new Account("Kelly", "19920714", Gender.female, Blood.AB); for (int i = 0; i < Account.TotalAccount; i++) { Console.WriteLine(account[i].Name + '\t' + account[i].Birthday + '\t' + account[i].Gender + '\t' + account[i].Bloodtype); } Console.WriteLine("Total account = {0}", Account.TotalAccount); } } enum Gender { male, female }; enum Blood { A, B, AB, O }; class Account { private static int totalAccount=0; private string name; private string birthday; private Gender gender; private Blood bloodtype; public Account() { name = "Allen"; birthday = "19800101"; gender = Gender.male; bloodtype = Blood.A; totalAccount++; } public Account(string name,string birthday,Gender gender,Blood bloodtype) { this.name = name; this.birthday = birthday; this.gender = gender; this.bloodtype = bloodtype; totalAccount++; } public String Name { set { name = value; } get { return name; } } public String Birthday { set { birthday = value; } get { return birthday; } } public Gender Gender { set { gender = value; } get { return gender; } } public Blood Bloodtype { set { bloodtype = value; } get { return bloodtype; } } public static int TotalAccount { get { return totalAccount; } } } }