Facebook
From yalçın deniz, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 119
  1.  
  2. void main(){
  3.  ogrenci ogrenci1 =new ogrenci();
  4.  ogrenci1._ad ="Nehir";
  5.  ogrenci1._soyad="Deniz";
  6.  ogrenci1._yas ="16";
  7.  ogrenci1._tcNo ="123456";
  8.  ogrenci1._email ="[email protected]";
  9.  
  10.  ogrenci ogrenci2 =
  11.       new ogrenci.namedCons("Güneş", "Deniz", 8, "1234567", "günes.com");
  12.  print("email :" + ogrenci2._email);
  13.  
  14.  
  15.  var ogrenciler = new List(3);
  16.  ogrenciler[0]=ogrenci1;
  17.  
  18.  var ogrenciIslem =new ogrecniIslem();
  19.  ogrenciIslem.kaydet(ogrenci1);
  20.  
  21. }
  22. class ogrenci{
  23.  
  24.   ogrenci(){
  25.     print("yapıcı blok çalıştı");
  26.   }
  27.  
  28.   ogrenci.namedCons(String ad, String soyad, int yas, String email, String tcNo){
  29.     this._ad =ad;
  30.     this._soyad =soyad;
  31.     this._yas =yas;
  32.     this._email = email;
  33.     this._tcNo = tcNo;
  34.   }
  35.   String _ad;
  36.   String _soyad;
  37.   String _yas;
  38.   String _email;
  39.   String _tcNo;
  40. }
  41.  
  42.  
  43. class ogrecniIslem{
  44.   void kaydet(ogrenci ogrenci){
  45.     print("kaydedildi" +ogrenci._ad);
  46.   }
  47.   void sil(){
  48.     print("silindi");
  49.   }
  50.   void guncelle(){
  51.     print("guncellendi");
  52.     var ogrenciIslem =new ogrecniIslem();
  53.     ogrenciIslem.sil();
  54.   }
  55. }