-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSinhVien.cs
96 lines (49 loc) · 1.56 KB
/
SinhVien.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace QuanLySinhVien
{
class SinhVien
{
public String maSV;
public String tenSV;
public float diemTB;
//default constructors
public SinhVien()
{
this.maSV = "01";
this.tenSV = "Le Dinh Phuong Nam";
this.diemTB = (float)8.0;
}
//tham so hoa constructors
public SinhVien(String maSV, String tenSV, float diemTB)
{
this.maSV = maSV;
this.tenSV = tenSV;
this.diemTB = diemTB;
}
public void nhapTT()
{
Console.Write("Nhap Ten SV: ");
this.tenSV = Console.ReadLine();
Console.Write("Nhap ma SV: ");
this.maSV = Console.ReadLine();
Console.Write("Nhap Diem SV:");
this.diemTB = Convert.ToSingle(Console.ReadLine());
Console.WriteLine("--------------");
}
public void In()
{
Console.WriteLine("Ma SV: {0} ", this.maSV);
Console.WriteLine("Ten SV: {0} ", this.tenSV);
Console.WriteLine("Diem TB SV: {0} ", this.diemTB);
Console.WriteLine("\n--------------------------\n");
}
public float diemtb()
{
return this.diemTB;
}
}
}