package com.example.myapplication1; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class DbHelper extends SQLiteOpenHelper { public static final int DATABASE_VERSION = 1; public static final String DATABASE_NAME = "Db.db"; public static final String TABLE_NAME = "Kisiler"; private static final String SQL_CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + " (" + "Id INTEGER PRIMARY KEY, " + "DersKodu TEXT, " + "OgrenciNo TEXT, " + "OgrenciAdSoyad BIT, " + "vize INTEGER, " + "lab INTEGER, " + "Fınal INTEGER " + ")"; private static final String SQL_DELETE_TABLE = "DROP TABLE IF EXISTS " + TABLE_NAME; public DbHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL(SQL_CREATE_TABLE); } @Override public void onUpgrade(SQLiteDatabase db, int i, int i1) { db.execSQL(SQL_DELETE_TABLE); onCreate(db); } } db helper package com.example.myapplication1; public class Not { public int id; public String DersKodu; public String OgrenciNo; public String OgrenciAdSoyad; public int vize; public int lab; public int fınal; public double puan(){ return vize *.3+lab *.1+fınal*.6; } public String durum(){ if (puan()>30){ } return puan()>30 ? "BAŞARILI": "BAŞARISIZ"; } public String harfNotu(){ String harf=""; if (puan()<30)harf="FF"; else if (puan()<42)harf="DD" ; else if (puan()<54)harf="DC" ; else if (puan()<65)harf="CC" ; else if (puan()<77)harf="BC" ; else if (puan()<88)harf="BB" ; else if (puan()<94)harf="BA" ; else if (puan()<100)harf="AA" ; else harf="hata" } } notjava