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