Mobil Programlama - Not Hesaplama Uygulaması

Not hesaplama uyguluması 2 ekrandan oluşmaktadır. 1. Ekran giriş ekranı, 2. ekran ise not hesaplama ekranıdır. Kullanıcı 1. ekranda Kullanıcı adı : admin , şifre : 1234 olarak giriş yaptığında Not Hesapla activitesini göreiblecektir. Hatalı giriş yaparsa Toast mesajı ile "Hatalı Giriş" mesajı verecektir.
Not hesaplama ise vize notunun %40 ve final notunun %60'ı toplanarak hesaplacaktır.

Android Not Hesaplama Uygulaması

 double donemSonuNot;  
   @Override  
   protected void onCreate(Bundle savedInstanceState) {  
     super.onCreate(savedInstanceState);  
     setContentView(R.layout.activity_main);  
     final EditText vizeNot=(EditText) findViewById(R.id.edtVize);  
     final EditText finalNot=(EditText) findViewById(R.id.edtFinal);  
     Button hesapla =(Button) findViewById(R.id.button);  
     hesapla.setOnClickListener(new View.OnClickListener() {  
       @Override  
       public void onClick(View v) {  
         int vize= Integer.parseInt(vizeNot.getText().toString());  
         int fnl=Integer.parseInt(finalNot.getText().toString());  
         donemSonuNot=vize*0.4+fnl*0.6;  
         Toast.makeText(getApplicationContext(),""+donemSonuNot,LENGTH_LONG).show();  
       }  
     });  
   }  

Yorumlar

Bu blogdaki popüler yayınlar

SQLite Değişken tipleri ve Komutları

Sistem Analizi ve Tasarımı Proje Sonu Bilgilendirme