8 private string name
= "Bukowski";
10 public bool set_age(int val
)
23 public void set_name(string new_name
)
28 public string get_name()
36 static void Main(string[] args
)
39 const int nr_students
= 3;
41 students
= new Person
[nr_students
];
43 for (int i
= 0; i
< students
.Length
; i
++) {
44 students
[i
] = new Person();
46 Console
.Write("\nName: ");
47 students
[i
].set_name(Console
.ReadLine());
49 Console
.Write("Age: ");
50 int aux
= Convert
.ToInt32(Console
.ReadLine());
51 students
[i
].set_age(aux
);
54 for (int i
= 0; i
< students
.Length
; i
++) {
55 Console
.WriteLine("\nName: {0}",
56 students
[i
].get_name());
57 Console
.WriteLine("Age: {0}",
58 students
[i
].get_age());