Ana sayfa » Java – Vize ve Final Ortalama Hesaplama
Java Vize ve Final Konsol Örnekleri

Java – Vize ve Final Ortalama Hesaplama

Java Vize ve Final Konsol Örnekleri

Merhaba arkadaşlar Java programlama dili örnekleri serimizde bugün vize ve final notlarının ortalamasını hesaplayan program örneğine yer vereceğiz. Bu yazımızda 2 adet Java örneğinden bahsedeceğiz. İlki console ekranında ikinci örnek ise  JOPTIONPANE ile form ekranında hazırlanmış örnekler olacaktır. Bu uygulama için ayrı ayrı vize ve final notu kullanıcıdan alınacak olup girilen öğrenciye ait ortalama hesaplama ve görüntüleme işlemlerini gerçekleştireceğiz. Yapacağımız örneklerde Vize notunun %40‘ının, Final notunun ise %60‘ının toplamı ortalamayı oluşturmaktadır.

Ortalamanın 65 den büyük olması durumunda durumunda ise öğrenci için Geçti, 50-60 arasında ise Şartlı Geçti değilse Kaldı mesajı erkana verilecektir.

Vize notunun %40‘ını ve Final notunun %60’sını iki farklı şekilde hesaplayabiliriz. 1. yöntem olarak vize*0.4, ikinci yöntem olarak ise vize*40/100 şeklinde. Final içinde aynı yöntemler geçerli sadece “60 veya 0.6”. Bu örneklerde ise biz 2. yöntemi kullanacağız.

Örnek1: Kullanıcıdan Alınan Vize ve Final Ortalamasını Bulan Konsol Program

package javaapplication2;
import java.util.Scanner;



public class JavaApplication2 {
    
    public static void main(String[] Args)
    {
        double vize,ffinal,toplam;
        Scanner input = new Scanner(System.in);
        
        System.out.printf("     Önemli Uyarı!!!! \n     Vize notunun yüzde 40'ı, Final notunun ise yüzde 60'sı geçerlidir. \n\n");
        System.out.printf("Vize notunuzu giriniz: ");
        vize=input.nextDouble();
        System.out.printf("Final notunuzu giriniz: ");
        ffinal=input.nextDouble();
        
        vize=vize*40/100;
        ffinal=ffinal*60/100;
        toplam=vize+ffinal;
        
        
        if (toplam>65.0)
        {
            System.out.printf(" Vize Notunuz: %.1f \n Final Notunuz: %.1f \n Sınav Notunuz: %.1f ve DERSİ GEÇTİNİZ! \n", vize, ffinal, toplam);
        }
        
        else if (toplam<=65 && toplam>=50)
        {
            System.out.printf(" Vize Notunuz: %.1f \n Final Notunuz: %.1f \n Sınav Notunuz: %.1f ve DERSİ ŞARTLI GEÇTİNİZ! \n", vize, ffinal, toplam);
        }
        else 
        {
            System.out.printf(" Vize Notunuz: %.1f \n Final Notunuz: %.1f \n Sınav Notunuz: %.1f ve DERSTEN KALDINIZ! \n", vize, ffinal, toplam);
        }
    }
}

Örnek2: Kullanıcıdan Alınan Vize ve Final Ortalamasını Bulan Program /// JOPTIONPANE ile

Tabii bunun için öncelikle JOPTİONPANE projesini C#’dan bildiğimiz üzere bir tane Form projesi açmanız gerekiyor. Sonrasında ise aşağıdaki kodları yazmak.

package javaapplication2;
import java.util.Scanner;
import javax.swing.JOptionPane;



public class JavaApplication2 {
    
    public static void main(String[] Args)
    {
        String vize,fınal;
        int ortalama;
        vize = JOptionPane.showInputDialog("Vize notunuzu giriniz");
        int not = Integer.parseInt(vize);
        fınal = JOptionPane.showInputDialog("Final notunuzu giriniz");
        int not2 = Integer.parseInt(fınal);
        ortalama = (not*40/100) + (not2*40/100);
        if(ortalama>50)
        {
        JOptionPane.showMessageDialog(null,"Geçtiniz");
        }
        else{
        JOptionPane.showMessageDialog(null,"Kaldınız");
        }
    }
    
}

Java – Vize ve Final Ortalama Hesaplama yazımızın sonuna geldik. Umarım sizlere faydalı olabilmişizdir. Ayrıca Java dilinde yazılmış daha fazla örnek ve konular için Java Dersleri yazısına tıklayarak ilgili örneklere ulaşabilirsiniz. Menü üzerinden ise Programlama>>Java kısımdan ulaşabilir. Veya sağ kısımda bulunan site içinde arama panelini kullanarak ulaşabilirsiniz.

Diğer sitemiz olan TechnoVadi‘de ise teknoloji, oyun, film ve dizi gibi kategorilerde birbirinden güzel makalelere göz atmayı unutmayın.

6 thoughts on “Java – Vize ve Final Ortalama Hesaplama”

  1. Hi there,

    Our list contains over 6,500 high authority websites that accept guest posts, saving you hours spent outreaching.

    The list includes each site’s SEO metrics and contact details, allowing you to contact them directly instead of paying overpriced agency fees.

    For more information, visit:

    Kind Regards,
    Felicity

  2. Hi there,

    We run an Instagram growth service, which increases your number of followers safely and practically.

    We aim to gain you 400-1200+ real human followers per month, with all actions safe as they are made manually (no bots).

    The price is just $60 (USD) per month, and we can start immediately.

    Let me know if you wish to see some of our previous work.

    Kind Regards,
    Megan

  3. Hi there,

    We run an Instagram growth service, which increases your number of followers both safely and practically.

    – Guaranteed: We guarantee to gain you 400-1200+ followers per month.
    – Real, human followers: People follow you because they are interested in your business or niche.
    – Safe: All actions are made manually. We do not use any bots.

    The price is just $60 (USD) per month, and we can start immediately.

    If you are interested, and would like to see some of our previous work, let me know and we can discuss further.

    Kind Regards,
    Megan

    If you are not interested please unsubscribe here:

  4. Hi there,

    We run an Instagram growth service, which increases your number of followers both safely and practically.

    – Guaranteed: We guarantee to gain you 300-1000+ followers per month.
    – Real, human followers: People follow you because they are interested in your business or niche.
    – Safe: All actions are made manually. We do not use any bots.

    The price is just $60 (USD) per month, and we can start immediately.

    If you are interested, and have any questions, reply back and we can discuss further.

    Kind Regards,
    Megan

Yorum bırakın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir