-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
70 lines (61 loc) · 2.67 KB
/
Copy pathProgram.cs
File metadata and controls
70 lines (61 loc) · 2.67 KB
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
using öğrenci_not;
using öğrenci_not.Service;
using System.Text;
public class Program
{
public static List<Student> students;
public static Random _random = new Random();
static Program()
{
students = new List<Student>()
{
new Student(_random.Next(1000),"Mehmet", "Demir", 85, 92),
new Student(_random.Next(1000),"Ayşe", "Kaya", 78, 88),
new Student(_random.Next(1000),"Fatma", "Yıldız", 95, 90),
new Student(_random.Next(1000),"Mustafa", "Çelik", 60, 75),
new Student(_random.Next(1000),"Ali", "Şahin", 100, 95),
new Student(_random.Next(1000),"Zeynep", "Öztürk", 45, 65),
new Student(_random.Next(1000),"Emre", "Aydın", 88, 84),
new Student(_random.Next(1000),"Elif", "Özdemir", 92, 96),
new Student(_random.Next(1000),"Hasan", "Arslan", 70, 68),
new Student(_random.Next(1000),"Hatice", "Doğan", 82, 79),
new Student(_random.Next(1000),"Merve", "Kılıç", 55, 60),
new Student(_random.Next(1000),"Burak", "Aslan", 90, 85),
new Student(_random.Next(1000),"Gizem", "Çetinkaya", 76, 80),
new Student(_random.Next(1000),"Can", "Kara", 65, 70),
new Student(_random.Next(1000),"Berk", "Koç", 80, 82),
new Student(_random.Next(1000),"Selin", "Kurt", 98, 95),
new Student(_random.Next(1000),"Eda", "Özkan", 72, 75),
new Student(_random.Next(1000),"Volkan", "Şimşek", 62, 58),
new Student(_random.Next(1000),"Cem", "Erdoğan", 84, 88),
new Student(_random.Next(1000),"Derya", "Çetin", 91, 94)
};
}
public static void Main(String[] args)
{
Console.InputEncoding = Encoding.UTF8;
Console.OutputEncoding = Encoding.UTF8;
while (true)
{
Console.Clear();
Menu.MainMenu();
Console.Write("\n👉 Lütfen yapmak istediğiniz işlemi seçiniz: ");
if (!byte.TryParse(Console.ReadLine(), out byte inputVal))
{
Console.WriteLine("\n❓ Geçersiz");
return;
}
Console.Clear();
switch (inputVal)
{
case 1: ListStudent.ListStudents(students); break;
case 2: students = AddStudent.AddNewStudent(students); break;
case 3: students = DeleteStudent.DeleteStudentById(students); break;
case 4: students = UpdateStudent.UpdateStudentById(students); break;
case 5: Environment.Exit(0); break;
default: Console.WriteLine("\n❓ Yapmak istediğiniz işlem geçersizdir."); break;
}
ConsoleHelper.WaitingScreen();
}
}
}