Untitled
unknown
csharp
3 years ago
4.8 kB
7
Indexable
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks namespace G034OKULYONETIMUYGULAMASI { internal class Uygulama { public Okul G034Okul = new Okul(); public void Calistir() { //SahteVeriGir(); //Menu(); //seçimAl //switch-case } public void SahteVeriGir() { //Ogrenci o = new Ogrenci(); //o.Ad = ""; //o.Soyad = ""; //o.Subesi = ""; G034Okul.OgrenciEkle(15, "M", "K", SUBE.A, CINSIYET.Erkek, new DateTime(2000, 05, 18)); G034Okul.OgrenciEkle(35, "M", "K", SUBE.A, CINSIYET.Erkek, new DateTime(2000, 05, 18)); G034Okul.OgrenciEkle(25, "M", "K", SUBE.A, CINSIYET.Erkek, new DateTime(2000, 05, 18)); G034Okul.OgrenciEkle(45, "M", "K", SUBE.A, CINSIYET.Erkek, new DateTime(2000, 05, 18)); G034Okul.OgrenciEkle(55, "M", "K", SUBE.A, CINSIYET.Erkek, new DateTime(2000, 05, 18)); G034Okul.OgrenciEkle(65, "M", "K", SUBE.A, CINSIYET.Erkek, new DateTime(2000, 05, 18)); G034Okul.OgrenciEkle(75, "M", "K", SUBE.A, CINSIYET.Erkek, new DateTime(2000, 05, 18)); } static void SahteVeriGir(); { G034.OgrenciEkle("Elif Selcuk", no:1, SUBE.A,CINSIYET.Kadin, new ) static void Menu() { Console.WriteLine("") } static void SecimAl() { } static void OgrenciListele() { } public void NotEkle() { Console.Write("Ögrencinin numarasi: "); int no = int.Parse(Console.ReadLine()); //no bilgi ile öğrenci tespit ediilecek.. Console.Write("Ögrencinin Adı Soyadı: "); Console.Write("Ögrencinin Subesi: "); Console.WriteLine(); DersAdi ders = DersAdi.Empty; Console.Write("Not eklemek istediğiniz ders: "); //string ders = Console.ReadLine(); Console.Write("Eklemek istediginiz not adedi: "); int adet = int.Parse(Console.ReadLine()); float not; for (int i = 0; i < adet; i++) { Console.WriteLine(i + 1 + ". Notu girin: "); not = float.Parse(Console.ReadLine()); G034Okul.NotEkle(no, ders, not); } static CINSIYET Ogrenci Cinsiyet (string mesaj) { do Console.Write(mesaj); string gelen = Console.ReadLine().ToUpper(); switch (gelen) { case "E"; return CINSIYET.Erkek; break; case "K"; return CINSIYET.Kiz; break; default: Console.WriteLine("Ogrenci cinsiyet bilgisini girin"); break; } } while (true) ; static SUBE OgrenciSube(string mesaj) { do { Console.Write(mesaj); string gelen = Console.ReadLine().ToUpper(); switch (gelen) { case "A"; return SUBE.A; break; case "B"; return SUBE.B; break; case "C"; return SUBE.C; break; default; ConsoleWriteLine("Ogrenci icin bir sube belirleyin."); break; } } while (true); } amespace G034OKULYONETIMUYGULAMASI { internal class Okul { public List<Ogrenci> Ogrenciler = new List<Ogrenci> < Ogrenci > (); //NotEkle //OgrenciEkleme //AdresGuncelle //OgrenciGuncelle //OgrenciListele public void OgrenciEkle(int no, string ad, string soyad, SUBE sube CINSIYET cins, DateTime, dogumTarihi); { this.Ogrenciler.Add(new Ogrenci(no, ad, soyad, SUBE, cins, DogumTarihi); } public void NotEkle(int no, DersAdi ders, float not); { Ogrenci o = this.Ogrenciler.Where(d=>d.No==no).FirstorDefault(); DersNotu dn = new DersNotu(ders, not); o.Notlar.Add(dn); using System; namespace G034OKULYONETIMUYGULAMASI { internal class Program { static void Main(string[] args) { new Uygulama().Calistir(); }
Editor is loading...