├── Abstract
├── Abstract.iml
├── out
│ └── production
│ │ └── Abstract
│ │ ├── Daire.class
│ │ ├── Kare.class
│ │ ├── Main.class
│ │ └── Sekil.class
└── src
│ ├── Daire.java
│ ├── Kare.java
│ ├── Main.java
│ └── Sekil.java
├── Android-Calculator-master
├── README.md
├── app
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── ahmetfurkandemir
│ │ │ └── hesapmakinesi
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── ahmetfurkandemir
│ │ │ │ └── hesapmakinesi
│ │ │ │ └── MainActivity.java
│ │ └── res
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ └── ic_launcher_background.xml
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── ahmetfurkandemir
│ │ └── hesapmakinesi
│ │ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── Anonim_Inner_Class
├── Anonim_Inner_Class.iml
├── out
│ └── production
│ │ └── Anonim_Inner_Class
│ │ ├── Main$1.class
│ │ ├── Main$2.class
│ │ ├── Main$Aogrenci.class
│ │ ├── Main$Iogrenci.class
│ │ └── Main.class
└── src
│ └── Main.java
├── Encapsulation_Avantaj_Dezavantaj
├── Abone.java
├── GelismisAbone.java
└── main.java
├── Generic
├── Generic_Class
│ ├── Generic_Class.iml
│ ├── out
│ │ └── production
│ │ │ └── Generic_Class
│ │ │ ├── CharYazdir.class
│ │ │ ├── GenericYazdir.class
│ │ │ ├── IntYazdir.class
│ │ │ ├── Main.class
│ │ │ ├── Ogrenci.class
│ │ │ ├── OgrenciYazdir.class
│ │ │ └── StringYazdir.class
│ └── src
│ │ ├── CharYazdir.java
│ │ ├── GenericYazdir.java
│ │ ├── IntYazdir.java
│ │ ├── Main.java
│ │ ├── Ogrenci.java
│ │ ├── OgrenciYazdir.java
│ │ └── StringYazdir.java
└── Generic_Metod
│ ├── Generic_Metod.iml
│ ├── out
│ └── production
│ │ └── Generic_Metod
│ │ ├── Main.class
│ │ └── Ogrenci.class
│ └── src
│ ├── Main.java
│ └── Ogrenci.java
├── Interfaceler
├── Interfaceler.iml
├── out
│ └── production
│ │ └── Interfaceler
│ │ ├── Icalisma.class
│ │ ├── Imuhendis.class
│ │ ├── Main.class
│ │ ├── MakineMuhendisi.class
│ │ └── PcMuhendis.class
└── src
│ ├── Icalisma.java
│ ├── Imuhendis.java
│ ├── Main.java
│ ├── MakineMuhendisi.java
│ └── PcMuhendis.java
├── Java-Workouts-V1
├── OOP kalıtım
│ ├── proje_sirket
│ │ ├── Calisan.java
│ │ ├── Patron.java
│ │ ├── Yönetici.java
│ │ └── main.java
│ ├── örenek 2
│ │ ├── Hayvan.java
│ │ ├── Köpek.java
│ │ └── main.java
│ └── örnek1
│ │ ├── caalisan.java
│ │ ├── main.java
│ │ └── yönetici.java
├── OOP
│ ├── pratik
│ │ ├── accont.java
│ │ └── main.java
│ ├── ögrenci_projesi
│ │ ├── main.java
│ │ └── student.java
│ ├── örnek1
│ │ ├── car.java
│ │ └── main.java
│ └── örnek2
│ │ ├── carr.java
│ │ └── main.java
└── composition
│ └── örnek1
│ ├── Anakart.java
│ ├── Bilgisayar.java
│ ├── Kasa.java
│ ├── Monitor.java
│ ├── Pixel.java
│ └── main.java
├── Java_LinkedList.java
├── Lokal_inner_class
├── Lokal_inner_class.iml
├── out
│ └── production
│ │ └── Lokal_inner_class
│ │ ├── Main$1Daire_Alan.class
│ │ ├── Main$1Daire_Cevre.class
│ │ ├── Main$1Kare_Alan.class
│ │ ├── Main$1Kare_Cevre.class
│ │ └── Main.class
└── src
│ └── Main.java
├── NEU_OOP_Quiz
├── OOP_quiz.pdf
├── out
│ └── production
│ │ └── untitled1
│ │ ├── AnaSayfa.class
│ │ ├── MatematikOgretmeni.class
│ │ ├── Ogretmen.class
│ │ └── RessimOgretmeni.class
├── src
│ ├── AnaSayfa.java
│ ├── MatematikOgretmeni.java
│ ├── Ogretmen.java
│ └── RessimOgretmeni.java
└── untitled1.iml
├── NEU_OOP_Quiz2
├── NYP_quiz.pdf
├── Quiz.iml
├── isciler.txt
├── out
│ └── production
│ │ └── Quiz
│ │ ├── Calisan.class
│ │ ├── Isci.class
│ │ ├── Maas.class
│ │ └── Main.class
└── src
│ ├── Calisan.java
│ ├── Isci.java
│ ├── Maas.java
│ └── Main.java
├── Non-Static_Inner_Classes
├── Non-Static_Inner_Classes.iml
├── out
│ └── production
│ │ └── Non-Static_Inner_Classes
│ │ ├── Main.class
│ │ ├── Matematik$Alan$Daire_alan.class
│ │ ├── Matematik$Alan.class
│ │ ├── Matematik$Asal.class
│ │ ├── Matematik$Factorial.class
│ │ └── Matematik.class
└── src
│ ├── Main.java
│ └── Matematik.java
├── Polymorphism
├── örnek1
│ └── main.java
└── örnek2
│ └── main.java
├── README.md
├── Static_inner_class
├── Static_inner_class.iml
├── out
│ └── production
│ │ └── Static_inner_class
│ │ ├── Geometri$Daire.class
│ │ ├── Geometri$Dikdörtgen.class
│ │ ├── Geometri$Kare.class
│ │ ├── Geometri.class
│ │ └── Main.class
└── src
│ ├── Geometri.java
│ └── Main.java
├── Thread1
├── Thread1.iml
├── out
│ └── production
│ │ └── Thread1
│ │ ├── Main.class
│ │ └── Printer.class
└── src
│ ├── Main.java
│ └── Printer.java
├── Thread2
├── Thread2.iml
├── out
│ └── production
│ │ └── Thread2
│ │ ├── Main$1.class
│ │ ├── Main$2.class
│ │ └── Main.class
└── src
│ └── Main.java
├── composition_örnek2
├── Gövde.java
├── Ic_alan.java
├── Iskelet.java
├── Motor.java
└── main.java
└── thread
├── out
└── production
│ └── thread
│ ├── Main.class
│ └── Printer.class
├── src
├── Main.java
└── Printer.java
└── thread.iml
/Abstract/Abstract.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Abstract/out/production/Abstract/Daire.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Abstract/out/production/Abstract/Daire.class
--------------------------------------------------------------------------------
/Abstract/out/production/Abstract/Kare.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Abstract/out/production/Abstract/Kare.class
--------------------------------------------------------------------------------
/Abstract/out/production/Abstract/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Abstract/out/production/Abstract/Main.class
--------------------------------------------------------------------------------
/Abstract/out/production/Abstract/Sekil.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Abstract/out/production/Abstract/Sekil.class
--------------------------------------------------------------------------------
/Abstract/src/Daire.java:
--------------------------------------------------------------------------------
1 | public class Daire extends Sekil {
2 |
3 | private int yari_cap;
4 |
5 | public Daire(String isim, int yari_cap){
6 | super(isim);
7 | this.setYari_cap(yari_cap);
8 | }
9 |
10 | @Override
11 | void cevre_hesapla() {
12 | System.out.println(getIsim() + " objesinin cevresi : " + (2*getYari_cap()*Math.PI));
13 | }
14 |
15 | @Override
16 | void alan_hesapla() {
17 |
18 | System.out.println(getIsim() + " objesinin alani : "+(Math.PI*getYari_cap()*getYari_cap()));
19 | }
20 |
21 | public int getYari_cap() {
22 | return yari_cap;
23 | }
24 |
25 | public void setYari_cap(int yari_cap) {
26 | this.yari_cap = yari_cap;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Abstract/src/Kare.java:
--------------------------------------------------------------------------------
1 | public class Kare extends Sekil{
2 |
3 | private int kenar;
4 |
5 | public Kare(String isim, int kenar){
6 | super(isim);
7 | this.setKenar(kenar);
8 |
9 | }
10 |
11 | @Override
12 | void cevre_hesapla() {
13 | System.out.println(getIsim() + " objesinin cevresi : "+(getKenar()*4));
14 | }
15 |
16 | @Override
17 | void alan_hesapla() {
18 | System.out.println(getIsim() + " objesinin alani : "+(getKenar()*getKenar()));
19 | }
20 |
21 | public int getKenar() {
22 | return kenar;
23 | }
24 |
25 | public void setKenar(int kenar) {
26 | this.kenar = kenar;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Abstract/src/Main.java:
--------------------------------------------------------------------------------
1 | public class Main {
2 |
3 | static public void main(String[] args){
4 |
5 | Kare kare1 = new Kare("kare1", 50);
6 | Daire daire1 = new Daire("daire1", 30);
7 |
8 | kare1.alan_hesapla();
9 | kare1.cevre_hesapla();
10 | daire1.alan_hesapla();
11 | daire1.cevre_hesapla();
12 |
13 | Sekil sekil1;
14 | sekil1 = new Kare("kare2", 90);
15 | sekil1.alan_hesapla();
16 | sekil1.cevre_hesapla();
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/Abstract/src/Sekil.java:
--------------------------------------------------------------------------------
1 | public abstract class Sekil{
2 |
3 | private String isim;
4 |
5 | public Sekil(String isim) {
6 | this.setIsim(isim);
7 | }
8 |
9 | abstract void alan_hesapla();
10 |
11 | abstract void cevre_hesapla();
12 |
13 | public String getIsim() {
14 | return isim;
15 | }
16 |
17 | public void setIsim(String isim) {
18 | this.isim = isim;
19 | }
20 |
21 | public void isim_soyle(){
22 |
23 | System.out.println(isim);
24 |
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/Android-Calculator-master/README.md:
--------------------------------------------------------------------------------
1 | # Android-Calculator
2 |
3 | Android ortamında çalışan hesap makinesi.
4 |
5 | Java programlama dili kullanıldı.
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 29
5 | buildToolsVersion "29.0.3"
6 | defaultConfig {
7 | applicationId "com.ahmetfurkandemir.hesapmakinesi"
8 | minSdkVersion 23
9 | targetSdkVersion 29
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | implementation fileTree(dir: 'libs', include: ['*.jar'])
24 | implementation 'androidx.appcompat:appcompat:1.0.2'
25 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
26 | testImplementation 'junit:junit:4.12'
27 | androidTestImplementation 'androidx.test:runner:1.1.1'
28 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
29 | }
30 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/androidTest/java/com/ahmetfurkandemir/hesapmakinesi/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.ahmetfurkandemir.hesapmakinesi;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.ahmetfurkandemir.hesapmakinesi", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/java/com/ahmetfurkandemir/hesapmakinesi/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.ahmetfurkandemir.hesapmakinesi;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.EditText;
8 | import android.widget.TextView;
9 |
10 | public class MainActivity extends AppCompatActivity {
11 |
12 | EditText sayi1;
13 | EditText sayi2;
14 | TextView sonuc;
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | setContentView(R.layout.activity_main);
20 |
21 | sayi1 = findViewById(R.id.islem1);
22 | sayi2 = findViewById(R.id.islem2);
23 | sonuc = findViewById(R.id.sonuc);
24 |
25 |
26 | }
27 |
28 |
29 | public void Toplama(View view){
30 |
31 |
32 | if(sayi1.getText().toString().matches("") || sayi2.getText().toString().matches("")){
33 |
34 | sonuc.setText("HATA!");
35 |
36 | }
37 |
38 | else {
39 |
40 | double sayi11 = Double.parseDouble(sayi1.getText().toString());
41 |
42 | double sayi22 = Double.parseDouble(sayi2.getText().toString());
43 |
44 | double toplam = sayi11 + sayi22;
45 |
46 | sonuc.setText("Sonuç = " + toplam);
47 | }
48 |
49 |
50 |
51 |
52 | }
53 |
54 | public void Cikarma(View view){
55 |
56 | if(sayi1.getText().toString().matches("") || sayi2.getText().toString().matches("")){
57 |
58 | sonuc.setText("HATA!");
59 |
60 | }
61 |
62 | else {
63 |
64 | double sayi11 = Double.parseDouble(sayi1.getText().toString());
65 |
66 | double sayi22 = Double.parseDouble(sayi2.getText().toString());
67 |
68 | double toplam = sayi11 - sayi22;
69 |
70 | sonuc.setText("Sonuç = " + toplam);
71 | }
72 |
73 | }
74 |
75 | public void Carpma(View view){
76 |
77 | if(sayi1.getText().toString().matches("") || sayi2.getText().toString().matches("")){
78 |
79 | sonuc.setText("HATA!");
80 |
81 | }
82 |
83 | else {
84 |
85 | double sayi11 = Double.parseDouble(sayi1.getText().toString());
86 |
87 | double sayi22 = Double.parseDouble(sayi2.getText().toString());
88 |
89 | double toplam = sayi11 * sayi22;
90 |
91 | sonuc.setText("Sonuç = " + toplam);
92 | }
93 |
94 |
95 | }
96 |
97 | public void Bolme(View view){
98 |
99 | if(sayi1.getText().toString().matches("") || sayi2.getText().toString().matches("")){
100 |
101 | sonuc.setText("HATA!");
102 |
103 | }
104 |
105 | else {
106 |
107 | double sayi11 = Double.parseDouble(sayi1.getText().toString());
108 |
109 | double sayi22 = Double.parseDouble(sayi2.getText().toString());
110 |
111 | double toplam = sayi11 / sayi22;
112 |
113 | sonuc.setText("Sonuç = " + toplam);
114 | }
115 |
116 |
117 | }
118 |
119 |
120 | }
121 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
19 |
20 |
31 |
32 |
42 |
43 |
52 |
53 |
62 |
63 |
72 |
73 |
82 |
83 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Android-Calculator-master/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Android-Calculator-master/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Android-Calculator-master/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Android-Calculator-master/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Android-Calculator-master/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Android-Calculator-master/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Android-Calculator-master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Android-Calculator-master/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Android-Calculator-master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Android-Calculator-master/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Hesap Makinesi
3 |
4 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Android-Calculator-master/app/src/test/java/com/ahmetfurkandemir/hesapmakinesi/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.ahmetfurkandemir.hesapmakinesi;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/Android-Calculator-master/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.5.0'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 |
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/Android-Calculator-master/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 |
21 |
--------------------------------------------------------------------------------
/Android-Calculator-master/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Android-Calculator-master/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Android-Calculator-master/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Feb 27 18:41:25 EET 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/Android-Calculator-master/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/Android-Calculator-master/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/Android-Calculator-master/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name='Hesap Makinesi'
3 |
--------------------------------------------------------------------------------
/Anonim_Inner_Class/Anonim_Inner_Class.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Anonim_Inner_Class/out/production/Anonim_Inner_Class/Main$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Anonim_Inner_Class/out/production/Anonim_Inner_Class/Main$1.class
--------------------------------------------------------------------------------
/Anonim_Inner_Class/out/production/Anonim_Inner_Class/Main$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Anonim_Inner_Class/out/production/Anonim_Inner_Class/Main$2.class
--------------------------------------------------------------------------------
/Anonim_Inner_Class/out/production/Anonim_Inner_Class/Main$Aogrenci.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Anonim_Inner_Class/out/production/Anonim_Inner_Class/Main$Aogrenci.class
--------------------------------------------------------------------------------
/Anonim_Inner_Class/out/production/Anonim_Inner_Class/Main$Iogrenci.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Anonim_Inner_Class/out/production/Anonim_Inner_Class/Main$Iogrenci.class
--------------------------------------------------------------------------------
/Anonim_Inner_Class/out/production/Anonim_Inner_Class/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Anonim_Inner_Class/out/production/Anonim_Inner_Class/Main.class
--------------------------------------------------------------------------------
/Anonim_Inner_Class/src/Main.java:
--------------------------------------------------------------------------------
1 | public class Main {
2 |
3 | public static void main(String[] args){
4 |
5 | Iogrenci ogrenci1 = new Iogrenci() {
6 | @Override
7 | public void ders_calis() {
8 | System.out.println("Ders calisiyorum");
9 | }
10 |
11 | @Override
12 | public void derse_gir() {
13 | System.out.println("Derse giriyorum");
14 | }
15 | };
16 | ogrenci1.ders_calis();
17 | ogrenci1.derse_gir();
18 | System.out.println("\n----");
19 |
20 | Aogrenci ogrenci2 = new Aogrenci("Ahmet Furkan DEMIR", 19){
21 |
22 | @Override
23 | void kayit_yaptir() {
24 |
25 | System.out.println(" Kayit yapildi. Isim : "+getIsim()+" No : "+getNo());
26 |
27 | }
28 |
29 |
30 | };
31 |
32 | ogrenci2.kayit_yaptir();
33 | ogrenci2.selamla();
34 |
35 | }
36 |
37 | public static abstract class Aogrenci{
38 |
39 | private String isim;
40 | private int no;
41 |
42 | public Aogrenci(String isim, int no){
43 | this.setIsim(isim);
44 | this.setNo(no);
45 | }
46 |
47 | abstract void kayit_yaptir();
48 |
49 | public void selamla(){
50 | System.out.println(" Selamlar...");
51 | }
52 |
53 | public String getIsim() {
54 | return isim;
55 | }
56 |
57 | public void setIsim(String isim) {
58 | this.isim = isim;
59 | }
60 |
61 | public int getNo() {
62 | return no;
63 | }
64 |
65 | public void setNo(int no) {
66 | this.no = no;
67 | }
68 | }
69 |
70 | public interface Iogrenci{
71 |
72 | void ders_calis();
73 | void derse_gir();
74 |
75 | }
76 |
77 | }
78 |
--------------------------------------------------------------------------------
/Encapsulation_Avantaj_Dezavantaj/Abone.java:
--------------------------------------------------------------------------------
1 | // Doğalgaz abonesi
2 |
3 | public class Abone {
4 |
5 | public String isim;
6 | public int bakiye;
7 | public String sehir;
8 |
9 | public void dogalgaz_kullan(int miktar) {
10 |
11 | if (bakiye - miktar < 0) {
12 | System.out.println("Yeterli bakiye yoktur.");
13 | } else if (bakiye - miktar == 0) {
14 |
15 | System.out.println("Bakiyeniz bitmiştir.");
16 |
17 | } else {
18 |
19 | bakiye -= miktar;
20 |
21 | System.out.println("Kalan bakiye : " + bakiye);
22 |
23 | }
24 |
25 | }
26 |
27 | public void bakiye_ogren(){
28 |
29 | System.out.println("Bakiye = " + bakiye);
30 |
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/Encapsulation_Avantaj_Dezavantaj/GelismisAbone.java:
--------------------------------------------------------------------------------
1 | public class GelismisAbone {
2 |
3 | private String isim;
4 | private int bakiye = 200;
5 | private String sehir;
6 |
7 |
8 | public GelismisAbone(String isim, int bakiye, String sehir) {
9 | this.setIsim(isim);
10 |
11 | if(bakiye >= 0 && bakiye < 201){
12 |
13 | this.setBakiye(bakiye);
14 |
15 | }
16 |
17 | this.setSehir(sehir);
18 | }
19 |
20 | public String getIsim() {
21 | return isim;
22 | }
23 |
24 | public void setIsim(String isim) {
25 | this.isim = isim;
26 | }
27 |
28 | public int getBakiye() {
29 | return bakiye;
30 | }
31 |
32 | public void setBakiye(int bakiye) {
33 | this.bakiye = bakiye;
34 | }
35 |
36 | public String getSehir() {
37 | return sehir;
38 | }
39 |
40 | public void setSehir(String sehir) {
41 | this.sehir = sehir;
42 | }
43 |
44 | public void bakiye_ogren(){
45 |
46 | System.out.println("Bakiyeniz : "+bakiye);
47 |
48 | }
49 |
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/Encapsulation_Avantaj_Dezavantaj/main.java:
--------------------------------------------------------------------------------
1 | public class main {
2 |
3 | // Encapsulation kullanmamanın dezavantajları:
4 | // 1-) Değikenlere direk erişilebilmektedir. ve saçma değerler atanabilir.
5 | // 2-) Değişkenlerden herhangi birine değer vermeseydik class larda hata verir.
6 | // 3-) Class lardaki herhangi bir değikenin adı değişirse çok sayıda değişiklik yapmanız gerekmektedir.
7 |
8 |
9 | // Encapsulation kullanmamanın avantajları:
10 | // 1-)istenile aralıkta değerler verilmezse bakiye ön tanımlı değer olarak kalır
11 | // 2-) Herhangi bir değiken adı değiştirilince class larda çok az bir değişiklik yapmalıyız.
12 | // 3-) Sınıftan yeni bir obje yaratılınca değişkenlere değer atamazsan hata verir.
13 |
14 |
15 | public static void main(String[] args){
16 |
17 | /*
18 | Abone abone = new Abone();
19 |
20 | abone.isim = "Ahmet Furkan Demir";
21 | abone.bakiye = 200;
22 | abone.sehir = "Ankara";
23 |
24 | abone.dogalgaz_kullan(190);
25 |
26 | */
27 |
28 | GelismisAbone abone = new GelismisAbone("Ahmet furkan demir",890,"İstanbul");
29 |
30 | abone.bakiye_ogren();
31 |
32 |
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/Generic/Generic_Class/Generic_Class.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Generic/Generic_Class/out/production/Generic_Class/CharYazdir.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Generic/Generic_Class/out/production/Generic_Class/CharYazdir.class
--------------------------------------------------------------------------------
/Generic/Generic_Class/out/production/Generic_Class/GenericYazdir.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Generic/Generic_Class/out/production/Generic_Class/GenericYazdir.class
--------------------------------------------------------------------------------
/Generic/Generic_Class/out/production/Generic_Class/IntYazdir.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Generic/Generic_Class/out/production/Generic_Class/IntYazdir.class
--------------------------------------------------------------------------------
/Generic/Generic_Class/out/production/Generic_Class/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Generic/Generic_Class/out/production/Generic_Class/Main.class
--------------------------------------------------------------------------------
/Generic/Generic_Class/out/production/Generic_Class/Ogrenci.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Generic/Generic_Class/out/production/Generic_Class/Ogrenci.class
--------------------------------------------------------------------------------
/Generic/Generic_Class/out/production/Generic_Class/OgrenciYazdir.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Generic/Generic_Class/out/production/Generic_Class/OgrenciYazdir.class
--------------------------------------------------------------------------------
/Generic/Generic_Class/out/production/Generic_Class/StringYazdir.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Generic/Generic_Class/out/production/Generic_Class/StringYazdir.class
--------------------------------------------------------------------------------
/Generic/Generic_Class/src/CharYazdir.java:
--------------------------------------------------------------------------------
1 | public class CharYazdir {
2 |
3 | public static void yazdir(Character[] dizi){
4 |
5 | for (Character c : dizi) {
6 | System.out.println(c);
7 | }
8 |
9 | }
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/Generic/Generic_Class/src/GenericYazdir.java:
--------------------------------------------------------------------------------
1 | public class GenericYazdir {
2 |
3 | public void yazdir(E[] data){
4 |
5 | for (E e : data) {
6 | System.out.println(e);
7 | }
8 |
9 | }
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/Generic/Generic_Class/src/IntYazdir.java:
--------------------------------------------------------------------------------
1 | public class IntYazdir {
2 |
3 | public static void yazdir(Integer[] dizi){
4 |
5 | for (Integer c : dizi) {
6 | System.out.println(c);
7 | }
8 |
9 | }
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/Generic/Generic_Class/src/Main.java:
--------------------------------------------------------------------------------
1 | public class Main {
2 |
3 | public static void main(String[] args){
4 |
5 | Character[] char_dizi = {'J','A','V','A'};
6 | Integer[] integer_dizi = {1,2,3,4,5,6};
7 |
8 | String[] String_dizi = {"Java", "Python", "C++", "Php"};
9 |
10 | Ogrenci[] ogrenci_dizi = {new Ogrenci("ahmet"), new Ogrenci("mahmut"),new Ogrenci("murat")};
11 |
12 | System.out.println("--");
13 | CharYazdir.yazdir(char_dizi);
14 |
15 | System.out.println("--");
16 | IntYazdir.yazdir(integer_dizi);
17 |
18 | System.out.println("--");
19 | StringYazdir.yazdir(String_dizi);
20 |
21 | System.out.println("--");
22 | OgrenciYazdir.yazdir(ogrenci_dizi);
23 |
24 | System.out.println("\n////////////////\n");
25 |
26 | GenericYazdir yazdir_Char = new GenericYazdir();
27 | yazdir_Char.yazdir(char_dizi);
28 |
29 | System.out.println("--");
30 | GenericYazdir yazdir_int = new GenericYazdir();
31 | yazdir_int.yazdir(integer_dizi);
32 |
33 | System.out.println("--");
34 | GenericYazdir yazdir_String = new GenericYazdir();
35 | yazdir_String.yazdir(String_dizi);
36 |
37 | System.out.println("--");
38 | GenericYazdir yazdir_ogr = new GenericYazdir();
39 | yazdir_ogr.yazdir(ogrenci_dizi);
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/Generic/Generic_Class/src/Ogrenci.java:
--------------------------------------------------------------------------------
1 | public class Ogrenci {
2 |
3 | private String isim;
4 |
5 | public Ogrenci(String isim){
6 | this.isim = isim;
7 | }
8 |
9 | public String getIsim() {
10 | return isim;
11 | }
12 |
13 | public void setIsim(String isim) {
14 | this.isim = isim;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 |
20 | return "Isim " + isim;
21 |
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/Generic/Generic_Class/src/OgrenciYazdir.java:
--------------------------------------------------------------------------------
1 | public class OgrenciYazdir {
2 |
3 | public static void yazdir(Ogrenci[] dizi){
4 |
5 | for (Ogrenci c : dizi) {
6 | System.out.println(c);
7 | }
8 |
9 | }
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/Generic/Generic_Class/src/StringYazdir.java:
--------------------------------------------------------------------------------
1 | public class StringYazdir {
2 |
3 | public static void yazdir(String[] dizi){
4 |
5 | for (String c : dizi) {
6 | System.out.println(c);
7 | }
8 |
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Generic/Generic_Metod/Generic_Metod.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Generic/Generic_Metod/out/production/Generic_Metod/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Generic/Generic_Metod/out/production/Generic_Metod/Main.class
--------------------------------------------------------------------------------
/Generic/Generic_Metod/out/production/Generic_Metod/Ogrenci.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Generic/Generic_Metod/out/production/Generic_Metod/Ogrenci.class
--------------------------------------------------------------------------------
/Generic/Generic_Metod/src/Main.java:
--------------------------------------------------------------------------------
1 | public class Main {
2 |
3 | public static void main(String[] arg){
4 |
5 | Character[] char_dizi = {'J','A','V','A'};
6 | Integer[] integer_dizi = {1,2,3,4,5,6};
7 |
8 | String[] String_dizi = {"Java", "Python", "C++", "Php"};
9 |
10 | Ogrenci[] ogrenci_dizi = {new Ogrenci("ahmet"), new Ogrenci("mahmut"),new Ogrenci("murat")};
11 |
12 | yazdir(char_dizi);
13 |
14 | System.out.println("---");
15 | yazdir(integer_dizi);
16 |
17 | System.out.println("---");
18 | yazdir(String_dizi);
19 |
20 | System.out.println("---");
21 | yazdir(ogrenci_dizi);
22 |
23 | }
24 |
25 | public static void yazdir(E[] data){
26 |
27 | for (E e: data) {
28 |
29 | System.out.println(e);
30 |
31 | }
32 |
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/Generic/Generic_Metod/src/Ogrenci.java:
--------------------------------------------------------------------------------
1 | public class Ogrenci {
2 |
3 | private String isim;
4 |
5 | public Ogrenci(String isim){
6 | this.isim = isim;
7 | }
8 |
9 | public String getIsim() {
10 | return isim;
11 | }
12 |
13 | public void setIsim(String isim) {
14 | this.isim = isim;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 |
20 | return "Isim " + isim;
21 |
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/Interfaceler/Interfaceler.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Interfaceler/out/production/Interfaceler/Icalisma.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Interfaceler/out/production/Interfaceler/Icalisma.class
--------------------------------------------------------------------------------
/Interfaceler/out/production/Interfaceler/Imuhendis.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Interfaceler/out/production/Interfaceler/Imuhendis.class
--------------------------------------------------------------------------------
/Interfaceler/out/production/Interfaceler/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Interfaceler/out/production/Interfaceler/Main.class
--------------------------------------------------------------------------------
/Interfaceler/out/production/Interfaceler/MakineMuhendisi.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Interfaceler/out/production/Interfaceler/MakineMuhendisi.class
--------------------------------------------------------------------------------
/Interfaceler/out/production/Interfaceler/PcMuhendis.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Interfaceler/out/production/Interfaceler/PcMuhendis.class
--------------------------------------------------------------------------------
/Interfaceler/src/Icalisma.java:
--------------------------------------------------------------------------------
1 | public interface Icalisma {
2 |
3 | void calis();
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/Interfaceler/src/Imuhendis.java:
--------------------------------------------------------------------------------
1 | public interface Imuhendis {
2 |
3 | void akerlik_sorgula();
4 | String mezuniyet_ortalama(double derece);
5 | void adli_sicil_sorgula();
6 | void is_tecrubesi(String[] array);
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/Interfaceler/src/Main.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Main {
4 |
5 | static public void main(String[] args){
6 |
7 | // pc müh.
8 | Imuhendis muhendis1 = new PcMuhendis(false, false);
9 |
10 | muhendis1.akerlik_sorgula();
11 | muhendis1.adli_sicil_sorgula();
12 | System.out.println(muhendis1.mezuniyet_ortalama(3.99));
13 |
14 | String[] tecrube = {"vestel", "havelsan", "turksat"};
15 |
16 | muhendis1.is_tecrubesi(tecrube);
17 |
18 | System.out.println("\n\n");
19 |
20 | MakineMuhendisi muhendis2 = new MakineMuhendisi(true, false);
21 |
22 | String[] tecrube1 = {};
23 |
24 | String[] referans = {"Ahmet Furkan Demir", "Demir"};
25 | muhendis2.adli_sicil_sorgula();
26 | muhendis2.akerlik_sorgula();
27 | System.out.println(muhendis2.mezuniyet_ortalama(3.5));
28 | muhendis2.is_tecrubesi(tecrube1);
29 | muhendis2.referans_getir(referans);
30 | muhendis2.calis();
31 |
32 |
33 | }
34 |
35 | public static void clear(){
36 | for(int i=0; i<25;i++){
37 | System.out.println();
38 | }
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/Interfaceler/src/MakineMuhendisi.java:
--------------------------------------------------------------------------------
1 | public class MakineMuhendisi implements Imuhendis, Icalisma {
2 |
3 | private boolean askerlik;
4 | private boolean adli_sicil;
5 |
6 | @Override
7 | public void calis() {
8 | System.out.println("Makine muhendisi calisiyor...");
9 | }
10 |
11 | public MakineMuhendisi(boolean askerlik, boolean adli_sicil){
12 |
13 | this.setAskerlik(askerlik);
14 | this.setAdli_sicil(adli_sicil);
15 |
16 | }
17 |
18 | @Override
19 | public void akerlik_sorgula() {
20 |
21 | if(isAskerlik()){
22 | System.out.println("Askerlik yapıldı");
23 | }
24 |
25 | else{
26 | System.out.println("Askerlik henüz yapilmadi");
27 | }
28 |
29 | }
30 |
31 | @Override
32 | public String mezuniyet_ortalama(double derece) {
33 | return "Ortalamam " + derece;
34 | }
35 |
36 | @Override
37 | public void adli_sicil_sorgula() {
38 | if(isAdli_sicil()){
39 | System.out.println("Adli sicil kaydi var");
40 | }
41 |
42 | else{
43 | System.out.println("Herhangi bir sicil kaydı yok");
44 | }
45 | }
46 |
47 | @Override
48 | public void is_tecrubesi(String[] array) {
49 |
50 | if(array.length==0){
51 | System.out.println("Herhangi bir is tecrubem bulunmuyor");
52 | }
53 |
54 | else{
55 | System.out.println("Makine müh. olarak şu şirketlerle calistim...");
56 |
57 | for(int i=0; i1500){
62 |
63 | System.out.println(" Girilen miktar hatalı");
64 |
65 | }
66 |
67 | else if(tl <= bakiye){
68 | bakiye -= tl;
69 | System.out.println(" Hesabınızdan "+tl+" Tl çekilmiştir"+
70 | "\n Hesabınızda kalan para = "+bakiye+" Tl");
71 | }
72 |
73 | else{
74 | System.out.println(" Hesabınızda yeterli bakiye bulunmamaktadır");
75 | }
76 |
77 | }
78 |
79 | public void parayatir(int tl){
80 |
81 | if(tl<0){
82 | System.out.println(" Girilen miktar hatalı");
83 | }
84 |
85 | else{
86 | bakiye += tl;
87 | }
88 |
89 | System.out.println(" Hesabınıza "+tl+" yatirilmistir"+
90 | " mevcut bakiyeniz = "+bakiye+" Tl");
91 |
92 | }
93 |
94 | public String getHesapno() {
95 | return hesapno;
96 | }
97 |
98 | public void setHesapno(String hesapno) {
99 | this.hesapno = hesapno;
100 | }
101 |
102 | public String getIsim() {
103 | return isim;
104 | }
105 |
106 | public void setIsim(String isim) {
107 | this.isim = isim;
108 | }
109 |
110 | public String getEmail() {
111 | return email;
112 | }
113 |
114 | public void setEmail(String email) {
115 | this.email = email;
116 | }
117 |
118 | public String getTelno() {
119 | return telno;
120 | }
121 |
122 | public void setTelno(String telno) {
123 | this.telno = telno;
124 | }
125 |
126 | public double getBakiye() {
127 | return bakiye;
128 | }
129 |
130 | public void setBakiye(double bakiye) {
131 | this.bakiye = bakiye;
132 | }
133 | }
134 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/OOP/pratik/main.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class main {
4 |
5 | public static void main(String[] args){
6 |
7 | Scanner scanner = new Scanner(System.in);
8 | accont hesap1 = new accont("1441","ahmed demir","demir@demir.com","0550505050",1000);
9 |
10 | accont hesap2 = new accont();
11 |
12 | int miktar = 0;
13 |
14 | boolean kontrol = true;
15 |
16 | while (true){
17 |
18 | if(kontrol == false){
19 | scanner.nextLine();
20 | }
21 |
22 | kontrol = false;
23 |
24 | System.out.println(" ----------- Demir -----------");
25 |
26 | System.out.print(" 1-) Mevcut bakiye"+
27 | "\n 2-) Genel bilgiler"+
28 | "\n 3-) Para çek"+
29 | "\n 4-) Para yatir"+
30 | "\n Q-) çıkış"+
31 | "\n Seçiminiz = ");
32 |
33 | String islem = scanner.nextLine();
34 |
35 | if(islem.equals("1")){
36 | System.out.println(" ----------- Demir -----------");
37 | System.out.println(" Mevcut bakiye = "+hesap1.getBakiye());
38 | }
39 |
40 | else if(islem.equals("2")){
41 | hesap1.yazdir();
42 | }
43 |
44 | else if(islem.equals("4")){
45 |
46 | System.out.println(" ----------- Demir -----------");
47 |
48 | System.out.print("\n Yatırılacak miktar = ");
49 |
50 | miktar = scanner.nextInt();
51 |
52 | hesap1.parayatir(miktar);
53 | }
54 |
55 | else if(islem.equals("3")){
56 |
57 | System.out.println(" ----------- Demir -----------");
58 |
59 | System.out.print("\n Çekilecek miktar = ");
60 |
61 | miktar = scanner.nextInt();
62 |
63 | hesap1.paracek(miktar);
64 | }
65 |
66 | else if(islem.equals("q") || islem.equals("Q")){
67 | break;
68 | }
69 |
70 | else{
71 | System.out.println(" Hatalı seçenek");
72 | }
73 |
74 |
75 | }
76 |
77 |
78 | }
79 |
80 | }
81 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/OOP/ögrenci_projesi/main.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class main {
4 |
5 | public static void main(String[] args){
6 |
7 | Scanner scanner = new Scanner(System.in);
8 |
9 | student ogrenci1 = new student();
10 |
11 | System.out.print(" ogrenci adi = ");
12 |
13 | ogrenci1.setOgrenci_adi(scanner.nextLine());
14 |
15 | System.out.print("\n ogrenci soyadi = ");
16 |
17 | ogrenci1.setOgrenci_soyadi(scanner.nextLine());
18 |
19 | System.out.print("\n ogrenci yas = ");
20 |
21 | ogrenci1.setYas(scanner.nextInt());
22 |
23 | System.out.print("\n ogreci t.c = ");
24 |
25 | ogrenci1.setTc_no(scanner.nextDouble());
26 |
27 | System.out.print("\n ogrenci okul no = ");
28 |
29 | ogrenci1.setOkul_no(scanner.nextInt());
30 |
31 | ogrenci1.yaz();
32 |
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/OOP/ögrenci_projesi/student.java:
--------------------------------------------------------------------------------
1 | public class student {
2 |
3 | private String ogrenci_adi;
4 | private String ogrenci_soyadi;
5 |
6 | private double tc_no;
7 | private int yas;
8 | private int okul_no;
9 |
10 | public String getOgrenci_adi() {
11 | return ogrenci_adi;
12 | }
13 |
14 | public void setOgrenci_adi(String ogrenci_adi) {
15 | this.ogrenci_adi = ogrenci_adi;
16 | }
17 |
18 | public String getOgrenci_soyadi() {
19 | return ogrenci_soyadi;
20 | }
21 |
22 | public void setOgrenci_soyadi(String ogrenci_soyadi) {
23 | this.ogrenci_soyadi = ogrenci_soyadi;
24 | }
25 |
26 | public double getTc_no() {
27 | return tc_no;
28 | }
29 |
30 | public void setTc_no(double tc_no) {
31 | this.tc_no = tc_no;
32 | }
33 |
34 | public int getYas() {
35 | return yas;
36 | }
37 |
38 | public void setYas(int yas) {
39 | this.yas = yas;
40 | }
41 |
42 | public int getOkul_no() {
43 | return okul_no;
44 | }
45 |
46 | public void setOkul_no(int okul_no) {
47 | this.okul_no = okul_no;
48 | }
49 |
50 | public void yaz(){
51 |
52 | System.out.println("\n Öğrenci adı = "+ogrenci_adi+
53 | "\n Öğrenci soyadı = "+ogrenci_soyadi+
54 | "\n Öğrenci T.C = "+tc_no+
55 | "\n Öğrenci yaş = "+yas+
56 | "\n Öğrenci okul no = "+okul_no);
57 |
58 |
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/OOP/örnek1/car.java:
--------------------------------------------------------------------------------
1 | public class car {
2 |
3 | public String renk;
4 | public int kapılar;
5 | public int teker_sayi;
6 | public String model;
7 | public String motor;
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/OOP/örnek1/main.java:
--------------------------------------------------------------------------------
1 | public class main {
2 |
3 | public static void main(String[] args){
4 |
5 | car araba1 = new car();
6 |
7 | araba1.kapılar = 4;
8 | araba1.teker_sayi = 4;
9 | araba1.renk = "kırmızı";
10 | araba1.motor = "motor";
11 | araba1.model = "opel";
12 |
13 | System.out.println(araba1.model);
14 |
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/OOP/örnek2/carr.java:
--------------------------------------------------------------------------------
1 | public class carr {
2 |
3 | protected String model;
4 | private String renk; // direk değistirilemz
5 | private int kapılar;
6 | private int teker_sayi;
7 | private String motor;
8 |
9 | public void setModel(String model){
10 | this.model = model;
11 | }
12 |
13 | public String getModel(){
14 | return model;
15 | }
16 |
17 | public String getRenk() {
18 | return renk;
19 | }
20 |
21 | public void setRenk(String renk) {
22 | this.renk = renk;
23 | }
24 |
25 | public int getKapılar() {
26 | return kapılar;
27 | }
28 |
29 | public void setKapılar(int kapılar) {
30 | this.kapılar = kapılar;
31 | }
32 |
33 | public int getTeker_sayi() {
34 | return teker_sayi;
35 | }
36 |
37 | public void setTeker_sayi(int teker_sayi) {
38 |
39 | if (teker_sayi < 0) {
40 | System.out.println("teker 0 dan düsük olamaz");
41 | } else {
42 | this.teker_sayi = teker_sayi;
43 |
44 |
45 | }
46 | }
47 | public String getMotor() {
48 | return motor;
49 | }
50 |
51 | public void setMotor(String motor) {
52 | this.motor = motor;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/OOP/örnek2/main.java:
--------------------------------------------------------------------------------
1 | public class main {
2 |
3 | public static void main(String[] args){
4 |
5 | carr araba1 = new carr();
6 |
7 | araba1.setModel("opel");
8 |
9 | araba1.setTeker_sayi(-2);
10 |
11 | System.out.println(araba1.getModel());
12 |
13 | carr araba5 = null;
14 |
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/composition/örnek1/Anakart.java:
--------------------------------------------------------------------------------
1 | public class Anakart {
2 |
3 | private String model;
4 | private String üretici;
5 | private int bellek_yuva_sayisi;
6 | private int cpu_pin_sayısı;
7 | private String isletim_sistemi;
8 |
9 | public Anakart(String model, String üretici, int bellek_yuva_sayisi, int cpu_pin_sayısı, String isletim_sistemi){
10 |
11 | this.setModel(model);
12 | this.setÜretici(üretici);
13 | this.setBellek_yuva_sayisi(bellek_yuva_sayisi);
14 | this.setCpu_pin_sayısı(cpu_pin_sayısı);
15 | this.isletim_sistemi = isletim_sistemi;
16 |
17 | }
18 |
19 | public void isletim_sistemi_yükle(String isletim_sis){
20 | isletim_sistemi = isletim_sis;
21 | System.out.println("\n işletim sistemi yüklendi");
22 | }
23 |
24 | public String getModel() {
25 | return model;
26 | }
27 |
28 | public void setModel(String model) {
29 | this.model = model;
30 | }
31 |
32 | public String getÜretici() {
33 | return üretici;
34 | }
35 |
36 | public void setÜretici(String üretici) {
37 | this.üretici = üretici;
38 | }
39 |
40 | public int getBellek_yuva_sayisi() {
41 | return bellek_yuva_sayisi;
42 | }
43 |
44 | public void setBellek_yuva_sayisi(int bellek_yuva_sayisi) {
45 | this.bellek_yuva_sayisi = bellek_yuva_sayisi;
46 | }
47 |
48 | public int getCpu_pin_sayısı() {
49 | return cpu_pin_sayısı;
50 | }
51 |
52 | public void setCpu_pin_sayısı(int cpu_pin_sayısı) {
53 | this.cpu_pin_sayısı = cpu_pin_sayısı;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/composition/örnek1/Bilgisayar.java:
--------------------------------------------------------------------------------
1 | public class Bilgisayar {
2 |
3 | private Monitor monitor;
4 | private Kasa kasa;
5 | private Anakart anakart;
6 |
7 | public Bilgisayar(Monitor monitor, Kasa kasa, Anakart anakart){
8 |
9 | this.setMonitor(monitor);
10 | this.setKasa(kasa);
11 | this.setAnakart(anakart);
12 | }
13 |
14 | public Monitor getMonitor() {
15 | return monitor;
16 | }
17 |
18 | public void setMonitor(Monitor monitor) {
19 | this.monitor = monitor;
20 | }
21 |
22 | public Kasa getKasa() {
23 | return kasa;
24 | }
25 |
26 | public void setKasa(Kasa kasa) {
27 | this.kasa = kasa;
28 | }
29 |
30 | public Anakart getAnakart() {
31 | return anakart;
32 | }
33 |
34 | public void setAnakart(Anakart anakart) {
35 | this.anakart = anakart;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/composition/örnek1/Kasa.java:
--------------------------------------------------------------------------------
1 | public class Kasa {
2 |
3 | private String model;
4 | private String üretici;
5 | private String malzeme;
6 |
7 | public Kasa(String model, String üretici, String malzeme){
8 |
9 | this.setModel(model);
10 | this.setÜretici(üretici);
11 | this.setMalzeme(malzeme);
12 |
13 | }
14 |
15 | public void kasa_ac(){
16 | System.out.println("\n Kasa açılıyor");
17 | }
18 |
19 | public String getModel() {
20 | return model;
21 | }
22 |
23 | public void setModel(String model) {
24 | this.model = model;
25 | }
26 |
27 | public String getÜretici() {
28 | return üretici;
29 | }
30 |
31 | public void setÜretici(String üretici) {
32 | this.üretici = üretici;
33 | }
34 |
35 | public String getMalzeme() {
36 | return malzeme;
37 | }
38 |
39 | public void setMalzeme(String malzeme) {
40 | this.malzeme = malzeme;
41 | }
42 | }
--------------------------------------------------------------------------------
/Java-Workouts-V1/composition/örnek1/Monitor.java:
--------------------------------------------------------------------------------
1 | public class Monitor {
2 |
3 | private String model;
4 | private String üretici;
5 | private String boyut;
6 | private Pixel pixel;
7 |
8 | public Monitor(String model, String üretici, String boyut, Pixel pixel){
9 |
10 | this.setModel(model);
11 | this.setÜretici(üretici);
12 | this.setBoyut(boyut);
13 | this.setPixel(pixel);
14 |
15 | }
16 |
17 | public void monutor_kapat(){
18 | System.out.println("\n monutor kapanıyor");
19 | }
20 |
21 | public String getModel() {
22 | return model;
23 | }
24 |
25 | public void setModel(String model) {
26 | this.model = model;
27 | }
28 |
29 | public String getÜretici() {
30 | return üretici;
31 | }
32 |
33 | public void setÜretici(String üretici) {
34 | this.üretici = üretici;
35 | }
36 |
37 | public String getBoyut() {
38 | return boyut;
39 | }
40 |
41 | public void setBoyut(String boyut) {
42 | this.boyut = boyut;
43 | }
44 |
45 | public Pixel getPixel() {
46 | return pixel;
47 | }
48 |
49 | public void setPixel(Pixel pixel) {
50 | this.pixel = pixel;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/composition/örnek1/Pixel.java:
--------------------------------------------------------------------------------
1 | public class Pixel {
2 |
3 | private int en;
4 | private int boy;
5 |
6 | public Pixel(int en, int boy){
7 | this.setEn(en);
8 | this.setBoy(boy);
9 | }
10 |
11 | public int getEn() {
12 | return en;
13 | }
14 |
15 | public void setEn(int en) {
16 | this.en = en;
17 | }
18 |
19 | public int getBoy() {
20 | return boy;
21 | }
22 |
23 | public void setBoy(int boy) {
24 | this.boy = boy;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Java-Workouts-V1/composition/örnek1/main.java:
--------------------------------------------------------------------------------
1 | public class main {
2 | // sahiplik ilişkisi var
3 | public static void main(String[] args){
4 |
5 | Pixel pixel = new Pixel(1920,1080);
6 | Monitor monitor = new Monitor("samsung a90","samsung","18.5",pixel);
7 |
8 | Kasa kasa = new Kasa("shadow black","shadow","metal");
9 |
10 | Anakart anakart = new Anakart("b250 pro","asus",4,1110,"Linux");
11 |
12 | Bilgisayar bilgisayar = new Bilgisayar(monitor,kasa,anakart);
13 |
14 | bilgisayar.getKasa().kasa_ac(); // dönen referans üzerinden işlem yapıyoruz.
15 |
16 | bilgisayar.getMonitor().monutor_kapat();
17 |
18 | bilgisayar.getAnakart().isletim_sistemi_yükle("pardus");
19 |
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/Java_LinkedList.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | class Telefon{
4 |
5 | private Telefon next;
6 |
7 | private String tel_turu;
8 | private String tel_no;
9 |
10 |
11 | public Telefon getNext() {
12 | return next;
13 | }
14 |
15 | public void setNext(Telefon next) {
16 | this.next = next;
17 | }
18 |
19 | public String getTel_turu() {
20 | return tel_turu;
21 | }
22 |
23 | public void setTel_turu(String tel_turu) {
24 | this.tel_turu = tel_turu;
25 | }
26 |
27 | public String getTel_no() {
28 | return tel_no;
29 | }
30 |
31 | public void setTel_no(String tel_no) {
32 | this.tel_no = tel_no;
33 | }
34 | }
35 |
36 | class Rehber{
37 |
38 | private Rehber next;
39 | private Telefon tel;
40 |
41 | private String kisi_adi;
42 | private int tel_adet;
43 | static public int count = 0;
44 |
45 |
46 | public Rehber getNext() {
47 | return next;
48 | }
49 |
50 | public void setNext(Rehber next) {
51 | this.next = next;
52 | }
53 |
54 | public Telefon getTel() {
55 | return tel;
56 | }
57 |
58 | public void setTel(Telefon tel) {
59 | this.tel = tel;
60 | }
61 |
62 | public String getKisi_adi() {
63 | return kisi_adi;
64 | }
65 |
66 | public void setKisi_adi(String kisi_adi) {
67 | this.kisi_adi = kisi_adi;
68 | }
69 |
70 | public int getTel_adet() {
71 | return tel_adet;
72 | }
73 |
74 | public void setTel_adet(int tel_adet) {
75 | this.tel_adet = tel_adet;
76 | }
77 | }
78 |
79 | public class Java_LinkedList {
80 |
81 | public static Rehber root;
82 | public static Rehber iterator;
83 | public static Telefon iterator_tel;
84 |
85 | static public void main(String[] args){
86 |
87 | int j = 1;
88 | Scanner input = new Scanner(System.in);
89 |
90 | root = new Rehber();
91 | iterator = root;
92 |
93 | while(true){
94 |
95 | clear();
96 | System.out.print("\n Kisi adi, soyadi : ");
97 | String ad = input.nextLine();
98 |
99 | iterator.setKisi_adi(ad);
100 | iterator.count += 1;
101 |
102 | iterator.setTel(new Telefon());
103 | iterator_tel = iterator.getTel();
104 |
105 | j = 1;
106 |
107 | while(true){
108 |
109 | clear();
110 | System.out.print("\n Kisi adi, soyadi : " + ad);
111 | iterator.setTel_adet(j);
112 |
113 |
114 | System.out.print("\n\n Tel turu : ");
115 | iterator_tel.setTel_turu(input.nextLine());
116 |
117 | System.out.print("\n Tel no : ");
118 | iterator_tel.setTel_no(input.nextLine());
119 |
120 | System.out.print("\n\n Telefon eklemeye devam etmek istiyormusunuz (E/e, H/h) : ");
121 | String sc = input.nextLine();
122 |
123 | if(sc.equals("H") || sc.equals("h")){
124 | iterator_tel.setNext(null);
125 | break;
126 | }
127 |
128 | else{
129 |
130 | iterator_tel.setNext(new Telefon());
131 |
132 | iterator_tel = iterator_tel.getNext();
133 |
134 | }
135 |
136 | j+=1;
137 |
138 | }
139 |
140 | System.out.print("\n\n Kisi eklemeye devam etmek istiyormusunuz (E/e, H/h) : ");
141 | String sc = input.nextLine();
142 |
143 | if(sc.equals("H") || sc.equals("h")){
144 | iterator.setNext(null);
145 | break;
146 | }
147 |
148 | else{
149 |
150 | iterator.setNext(new Rehber());
151 |
152 | iterator = iterator.getNext();
153 |
154 | }
155 |
156 | }
157 |
158 | yazdir();
159 | }
160 |
161 | public static void yazdir(){
162 |
163 | clear();
164 |
165 | iterator = root;
166 |
167 | for(int i=0; i
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Lokal_inner_class/out/production/Lokal_inner_class/Main$1Daire_Alan.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Lokal_inner_class/out/production/Lokal_inner_class/Main$1Daire_Alan.class
--------------------------------------------------------------------------------
/Lokal_inner_class/out/production/Lokal_inner_class/Main$1Daire_Cevre.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Lokal_inner_class/out/production/Lokal_inner_class/Main$1Daire_Cevre.class
--------------------------------------------------------------------------------
/Lokal_inner_class/out/production/Lokal_inner_class/Main$1Kare_Alan.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Lokal_inner_class/out/production/Lokal_inner_class/Main$1Kare_Alan.class
--------------------------------------------------------------------------------
/Lokal_inner_class/out/production/Lokal_inner_class/Main$1Kare_Cevre.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Lokal_inner_class/out/production/Lokal_inner_class/Main$1Kare_Cevre.class
--------------------------------------------------------------------------------
/Lokal_inner_class/out/production/Lokal_inner_class/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Lokal_inner_class/out/production/Lokal_inner_class/Main.class
--------------------------------------------------------------------------------
/Lokal_inner_class/src/Main.java:
--------------------------------------------------------------------------------
1 | public class Main {
2 |
3 | public static void main(String[] args){
4 |
5 | class Daire_Alan{
6 | public void daire_alan(int yaricap){
7 | System.out.println(" Daire alan : "+(yaricap*yaricap*Math.PI));
8 | }
9 |
10 | }
11 |
12 | class Daire_Cevre{
13 |
14 | public void daire_cevre(int yaricap){
15 | System.out.println(" Daire alan : "+(2*yaricap*Math.PI));
16 | }
17 |
18 | }
19 |
20 | class Kare_Alan{
21 | public void kare_alan(int kenar){
22 | System.out.println(" Daire alan : "+(kenar*kenar));
23 | }
24 |
25 | }
26 |
27 | class Kare_Cevre{
28 |
29 | public void kare_cevre(int kenar){
30 | System.out.println(" Daire alan : "+(kenar*4));
31 | }
32 |
33 | }
34 |
35 | Daire_Alan alan_daire = new Daire_Alan();
36 | Daire_Cevre cevre_daire = new Daire_Cevre();
37 |
38 | Kare_Alan alan_kare = new Kare_Alan();
39 | Kare_Cevre cevre_kare = new Kare_Cevre();
40 |
41 | alan_daire.daire_alan(5);
42 | cevre_daire.daire_cevre(5);
43 |
44 | System.out.println("\n\n");
45 |
46 | alan_kare.kare_alan(9);
47 | cevre_kare.kare_cevre(9);
48 | }
49 |
50 |
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/NEU_OOP_Quiz/OOP_quiz.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/NEU_OOP_Quiz/OOP_quiz.pdf
--------------------------------------------------------------------------------
/NEU_OOP_Quiz/out/production/untitled1/AnaSayfa.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/NEU_OOP_Quiz/out/production/untitled1/AnaSayfa.class
--------------------------------------------------------------------------------
/NEU_OOP_Quiz/out/production/untitled1/MatematikOgretmeni.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/NEU_OOP_Quiz/out/production/untitled1/MatematikOgretmeni.class
--------------------------------------------------------------------------------
/NEU_OOP_Quiz/out/production/untitled1/Ogretmen.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/NEU_OOP_Quiz/out/production/untitled1/Ogretmen.class
--------------------------------------------------------------------------------
/NEU_OOP_Quiz/out/production/untitled1/RessimOgretmeni.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/NEU_OOP_Quiz/out/production/untitled1/RessimOgretmeni.class
--------------------------------------------------------------------------------
/NEU_OOP_Quiz/src/AnaSayfa.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class AnaSayfa {
4 |
5 | public static void main(String[] args){
6 |
7 | Scanner input = new Scanner(System.in);
8 |
9 | System.out.println("\n -- Ogretmen ekle --");
10 |
11 | System.out.print("\n Kaç adet ressim ogretmeni eklenecek : ");
12 | int ressim_adet = input.nextInt();
13 |
14 | System.out.print("\n Kaç adet Matematik ogretmeni eklenecek : ");
15 | int matematik_adet = input.nextInt();
16 |
17 | clear();
18 |
19 | MatematikOgretmeni[] mat = new MatematikOgretmeni[matematik_adet];
20 | RessimOgretmeni[] res = new RessimOgretmeni[ressim_adet];
21 |
22 | String Ad;
23 | String Soyad;
24 | int Yas;
25 | int Gs;
26 |
27 | for(int i = 0; i< ressim_adet; i++){
28 |
29 | input.nextLine();
30 | System.out.println("\n -- Ogretmen ekle (Ressim) --");
31 |
32 | System.out.print("\n Ogretmen Adi : ");
33 | Ad = input.nextLine();
34 |
35 | System.out.print(" Ogretmen Soyadi : ");
36 | Soyad = input.nextLine();
37 |
38 | System.out.print(" Ogretmen Yas : ");
39 | Yas = input.nextInt();
40 |
41 | System.out.print(" Ogretmen Görev Süresi : ");
42 | Gs = input.nextInt();
43 |
44 | res[i] = new RessimOgretmeni(Ad,Soyad,Yas, Gs);
45 | clear();
46 |
47 | }
48 |
49 |
50 | for(int i = 0; i< matematik_adet; i++){
51 |
52 | System.out.println("\n -- Ogretmen ekle (Matematik) --");
53 | input.nextLine();
54 | System.out.print("\n Ogretmen Adi : ");
55 | Ad = input.nextLine();
56 |
57 | System.out.print(" Ogretmen Soyadi : ");
58 | Soyad = input.nextLine();
59 |
60 | System.out.print(" Ogretmen Yas : ");
61 | Yas = input.nextInt();
62 |
63 | System.out.print(" Ogretmen Görev Süresi : ");
64 | Gs = input.nextInt();
65 |
66 | mat[i] = new MatematikOgretmeni(Ad,Soyad,Yas, Gs);
67 | clear();
68 |
69 | }
70 |
71 | System.out.println(" Toplam ogretmen adeti : " + Ogretmen.getCount());
72 | System.out.print("\n\n Tum ogretmenleri yazdirmek icin Enter'e basiniz : ");
73 | input.nextLine();
74 |
75 | clear();
76 |
77 | System.out.println("\n -- Ressim ogretmenleri --\n");
78 |
79 | for(int i=0; i
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/NEU_OOP_Quiz2/NYP_quiz.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/NEU_OOP_Quiz2/NYP_quiz.pdf
--------------------------------------------------------------------------------
/NEU_OOP_Quiz2/Quiz.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/NEU_OOP_Quiz2/isciler.txt:
--------------------------------------------------------------------------------
1 | 1000,ahmet furkan,demir,3512.6666666666665,Isci
2 | 1002,demir ahmet,furkan,3416.6666666666665,Isci
3 | 1004,ali mehmet,danaci,3933.3333333333335,Isci
4 |
--------------------------------------------------------------------------------
/NEU_OOP_Quiz2/out/production/Quiz/Calisan.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/NEU_OOP_Quiz2/out/production/Quiz/Calisan.class
--------------------------------------------------------------------------------
/NEU_OOP_Quiz2/out/production/Quiz/Isci.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/NEU_OOP_Quiz2/out/production/Quiz/Isci.class
--------------------------------------------------------------------------------
/NEU_OOP_Quiz2/out/production/Quiz/Maas.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/NEU_OOP_Quiz2/out/production/Quiz/Maas.class
--------------------------------------------------------------------------------
/NEU_OOP_Quiz2/out/production/Quiz/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/NEU_OOP_Quiz2/out/production/Quiz/Main.class
--------------------------------------------------------------------------------
/NEU_OOP_Quiz2/src/Calisan.java:
--------------------------------------------------------------------------------
1 | public abstract class Calisan {
2 |
3 | public int id;
4 | public String ad;
5 | public String soyad;
6 | public int yas;
7 | public int cs;
8 |
9 | public static int count = 1000;
10 |
11 | public Calisan(String ad, String soyad, int yas, int cs){
12 |
13 | this.ad = ad;
14 | this.soyad = soyad;
15 | this.yas = yas;
16 | this.cs = cs;
17 | this.id = count;
18 | count+=2;
19 |
20 | }
21 |
22 | abstract double ZamOraniHesapla();
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/NEU_OOP_Quiz2/src/Isci.java:
--------------------------------------------------------------------------------
1 | public class Isci extends Calisan implements Maas {
2 |
3 | public String gorev;
4 |
5 | public Isci(String ad, String soyad, int yas, int cs) {
6 | super(ad, soyad, yas, cs);
7 | gorev = "Isci";
8 | }
9 |
10 | @Override
11 | double ZamOraniHesapla() {
12 | double temp = cs*100.0 + (yas*(2.0/3.0));
13 | return temp;
14 | }
15 |
16 | @Override
17 | public double MaasHesapla() {
18 | return ZamOraniHesapla()+3000;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/NEU_OOP_Quiz2/src/Maas.java:
--------------------------------------------------------------------------------
1 | public interface Maas {
2 |
3 | abstract double MaasHesapla();
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/NEU_OOP_Quiz2/src/Main.java:
--------------------------------------------------------------------------------
1 | import java.io.IOException;
2 | import java.util.Scanner;
3 | import java.util.ArrayList;
4 | import java.io.FileWriter;
5 |
6 | public class Main {
7 |
8 | public static void main(String[] args) throws IOException {
9 |
10 | FileWriter myWriter = new FileWriter("isciler.txt", true);
11 | Scanner input = new Scanner(System.in);
12 |
13 | System.out.print(" Isci adedi giriniz : ");
14 | int isci_adet = input.nextInt();
15 |
16 | ArrayList isci = new ArrayList();
17 |
18 | String ad, soyad;
19 | int yas, cs;
20 |
21 | for(int i=0; i isci, int adet, FileWriter myWriter, int kn) throws IOException {
49 |
50 | if(kn==0) {
51 | clear();
52 |
53 | for (int i = 0; i < adet; i++) {
54 |
55 | Isci temp = isci.get(i);
56 |
57 | System.out.println("\n\n -------------");
58 | System.out.println((i + 1) + ". Isci id : " + temp.id);
59 | System.out.println((i + 1) + ". Isci Adi : " + temp.ad);
60 | System.out.println((i + 1) + ". Isci Soyadi : " + temp.soyad);
61 | System.out.println((i + 1) + ". Isci Maas : " + temp.MaasHesapla());
62 | System.out.println((i + 1) + ". Isci Gorev : " + temp.gorev);
63 |
64 |
65 | }
66 | }
67 |
68 | else{
69 |
70 | String yaz = "";
71 | for (int i = 0; i < adet; i++) {
72 |
73 | Isci temp = isci.get(i);
74 |
75 | yaz += temp.id+","+temp.ad+","+temp.soyad+","+temp.MaasHesapla()+","+temp.gorev+"\n";
76 |
77 | }
78 |
79 | myWriter.write(yaz);
80 | myWriter.close();
81 | }
82 |
83 | }
84 |
85 | public static void clear(){
86 |
87 | for(int i=0; i<25; i++){
88 | System.out.println();
89 | }
90 |
91 | }
92 |
93 | }
94 |
--------------------------------------------------------------------------------
/Non-Static_Inner_Classes/Non-Static_Inner_Classes.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Main.class
--------------------------------------------------------------------------------
/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Matematik$Alan$Daire_alan.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Matematik$Alan$Daire_alan.class
--------------------------------------------------------------------------------
/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Matematik$Alan.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Matematik$Alan.class
--------------------------------------------------------------------------------
/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Matematik$Asal.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Matematik$Asal.class
--------------------------------------------------------------------------------
/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Matematik$Factorial.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Matematik$Factorial.class
--------------------------------------------------------------------------------
/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Matematik.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Non-Static_Inner_Classes/out/production/Non-Static_Inner_Classes/Matematik.class
--------------------------------------------------------------------------------
/Non-Static_Inner_Classes/src/Main.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Main {
4 |
5 | static public void main(String[] args){
6 |
7 | Matematik.Factorial fakt = new Matematik().new Factorial();
8 | Matematik.Asal asal = new Matematik().new Asal();
9 | Matematik.Alan alan = new Matematik().new Alan();
10 | Matematik.Alan.Daire_alan daire_alan1 = new Matematik().new Alan().new Daire_alan();
11 |
12 |
13 | Scanner input = new Scanner(System.in);
14 |
15 | System.out.println(" Sayi gir : ");
16 | int sayi = input.nextInt();
17 |
18 | if(asal.asalmi(sayi)){
19 | System.out.println("Asal sayi");
20 | }
21 | else{
22 | System.out.println("Sayi asal degil");
23 | }
24 |
25 | fakt.faktoryel();
26 |
27 | alan.daire_alan(sayi);
28 |
29 | daire_alan1.daire_alan(sayi);
30 |
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/Non-Static_Inner_Classes/src/Matematik.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Matematik {
4 |
5 | private double pi = Math.PI;
6 |
7 | public class Factorial{
8 |
9 | public void faktoryel(){
10 |
11 | Scanner input = new Scanner(System.in);
12 |
13 | System.out.println(" Bir sayi giriniz : ");
14 | int sayi = input.nextInt();
15 | double sayi_son = 1;
16 |
17 | for(int i=1; i=0 && zam <=800){
30 |
31 | this.maas += zam;
32 | }
33 |
34 | }
35 |
36 | public void maas_bilgi(){
37 |
38 | System.out.println(" Aylık maas = "+maas);
39 |
40 | }
41 |
42 | }
43 |
44 | class Yönetici extends Isci{
45 |
46 | private String departman;
47 |
48 | public Yönetici(String isim, double maas, String departman) {
49 | super(isim, maas);
50 | this.departman = departman;
51 | }
52 |
53 | @Override
54 | public void maas_zam(double zam) {
55 | super.maas_zam(zam);
56 | }
57 |
58 | public String getDepartman() {
59 | return departman;
60 | }
61 |
62 | public void setDepartman(String departman) {
63 | this.departman = departman;
64 | }
65 |
66 | @Override
67 | public void maas_bilgi() {
68 | super.maas_bilgi();
69 | }
70 | }
71 |
72 | class Patron extends Yönetici{
73 |
74 | private String şirket_ad;
75 |
76 | public Patron(String isim, double maas, String departman, String şirket_ad) {
77 | super(isim, maas, departman);
78 | this.şirket_ad = şirket_ad;
79 | }
80 |
81 | public String getŞirket_ad() {
82 | return şirket_ad;
83 | }
84 |
85 | public void setŞirket_ad(String şirket_ad) {
86 | this.şirket_ad = şirket_ad;
87 | }
88 |
89 | @Override
90 | public void maas_bilgi() {
91 | super.maas_bilgi();
92 | }
93 | }
94 |
95 | public class main{
96 |
97 | public static void main(String[] args) {
98 |
99 | Isci isci = new Isci("mehmet soner",4000);
100 | isci.maas_zam(200);
101 | isci.maas_bilgi();
102 |
103 | Isci yönetici = new Yönetici
104 |
105 |
106 |
107 |
108 |
109 | -p("mehmet kalem",700,"yazılım");
110 | yönetici.maas_zam(100);
111 | yönetici.maas_bilgi();
112 |
113 | Yönetici patron = new Patron("mehmet kalem",700,"yazılım","demir");
114 | patron.maas_zam(100);
115 | patron.maas_bilgi();
116 | }
117 |
118 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # Java-Workouts
4 |
5 | * Uzun soluklu Java egzersizleri projemiz.
6 | * Java programlama dilinin önemli konularını tekrar edeceğiz.
7 | * Java programlama dili ile projeler yazacağız.
8 | * Başlangıç tarihi 14/05/2020
9 |
10 | 
11 |
--------------------------------------------------------------------------------
/Static_inner_class/Static_inner_class.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Static_inner_class/out/production/Static_inner_class/Geometri$Daire.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Static_inner_class/out/production/Static_inner_class/Geometri$Daire.class
--------------------------------------------------------------------------------
/Static_inner_class/out/production/Static_inner_class/Geometri$Dikdörtgen.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Static_inner_class/out/production/Static_inner_class/Geometri$Dikdörtgen.class
--------------------------------------------------------------------------------
/Static_inner_class/out/production/Static_inner_class/Geometri$Kare.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Static_inner_class/out/production/Static_inner_class/Geometri$Kare.class
--------------------------------------------------------------------------------
/Static_inner_class/out/production/Static_inner_class/Geometri.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Static_inner_class/out/production/Static_inner_class/Geometri.class
--------------------------------------------------------------------------------
/Static_inner_class/out/production/Static_inner_class/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Static_inner_class/out/production/Static_inner_class/Main.class
--------------------------------------------------------------------------------
/Static_inner_class/src/Geometri.java:
--------------------------------------------------------------------------------
1 | public class Geometri {
2 |
3 | public static class Kare{
4 |
5 | public void kare_alan(int kenar){
6 |
7 | System.out.println(" Kare alani : "+(kenar*kenar));
8 |
9 | }
10 |
11 | public void Kare_cevre(int kenar){
12 |
13 | System.out.println(" Kare cevresi : "+(kenar*4));
14 | }
15 |
16 | }
17 |
18 | public static class Daire{
19 |
20 | public void daire_alan(int yari_cap){
21 |
22 | System.out.println(" Daire alan : "+(Math.PI*yari_cap*yari_cap));
23 |
24 | }
25 |
26 | public void daire_cevre(int yari_cap){
27 |
28 | System.out.println(" Daire cevre : "+(2*Math.PI*yari_cap));
29 |
30 | }
31 |
32 | }
33 |
34 | public static class Dikdörtgen{
35 |
36 | public void alan(int uzun, int kisa){
37 |
38 | System.out.println(" Dikdörtgen alani : "+(uzun*kisa));
39 |
40 | }
41 |
42 | public void cevre(int uzun, int kisa){
43 |
44 | System.out.println(" Dikdörtgen cevresi : "+(uzun*2 + kisa*2));
45 |
46 | }
47 |
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/Static_inner_class/src/Main.java:
--------------------------------------------------------------------------------
1 | public class Main {
2 |
3 | public static void main(String[] args){
4 |
5 | Geometri.Daire daire = new Geometri.Daire();
6 | Geometri.Kare kare = new Geometri.Kare();
7 | Geometri.Dikdörtgen dikdörtgen = new Geometri.Dikdörtgen();
8 |
9 | daire.daire_alan(5);
10 | daire.daire_cevre(5);
11 |
12 | kare.kare_alan(9);
13 | kare.Kare_cevre(9);
14 |
15 | dikdörtgen.alan(8,5);
16 | dikdörtgen.cevre(8,5);
17 |
18 |
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/Thread1/Thread1.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Thread1/out/production/Thread1/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Thread1/out/production/Thread1/Main.class
--------------------------------------------------------------------------------
/Thread1/out/production/Thread1/Printer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Thread1/out/production/Thread1/Printer.class
--------------------------------------------------------------------------------
/Thread1/src/Main.java:
--------------------------------------------------------------------------------
1 | public class Main {
2 |
3 | public static void main(String[] args){
4 |
5 | Thread printer1 = new Thread(new Printer("printer1"));
6 | Thread printer2 = new Thread(new Printer("printer2"));
7 | printer1.start();
8 | printer2.start();
9 |
10 | System.out.println("Main Thread son buldu.");
11 |
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/Thread1/src/Printer.java:
--------------------------------------------------------------------------------
1 | public class Printer implements Runnable{
2 |
3 | private String isim;
4 |
5 | public Printer(String ad){
6 | this.setIsim(ad);
7 | }
8 |
9 | @Override
10 | public void run() {
11 | System.out.println(isim + " Isim calisiyor");
12 |
13 | for(int i=0; i<20;i++){
14 | System.out.println(isim+" Yaziyor .. : "+i);
15 | }
16 |
17 | try {
18 | Thread.sleep(1000);
19 | } catch (InterruptedException e) {
20 | e.printStackTrace();
21 | }
22 |
23 | System.out.println(isim+" Isini bitirdi....");
24 | }
25 |
26 | public String getIsim() {
27 | return isim;
28 | }
29 |
30 | public void setIsim(String isim) {
31 | this.isim = isim;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Thread2/Thread2.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Thread2/out/production/Thread2/Main$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Thread2/out/production/Thread2/Main$1.class
--------------------------------------------------------------------------------
/Thread2/out/production/Thread2/Main$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Thread2/out/production/Thread2/Main$2.class
--------------------------------------------------------------------------------
/Thread2/out/production/Thread2/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/Thread2/out/production/Thread2/Main.class
--------------------------------------------------------------------------------
/Thread2/src/Main.java:
--------------------------------------------------------------------------------
1 | public class Main {
2 |
3 | public static void main(String[] args){
4 |
5 | Thread printer1 = new Thread(new Runnable(){
6 |
7 | @Override
8 | public void run() {
9 | System.out.println("Thread calisiyor.");
10 |
11 | for(int i=0; i<50;i++){
12 | System.out.println("Thread1 : "+i);
13 | }
14 |
15 | try {
16 | Thread.sleep(1000);
17 | } catch (InterruptedException e) {
18 | e.printStackTrace();
19 | }
20 | }
21 | });
22 | printer1.start();
23 |
24 | new Thread(new Runnable(){
25 |
26 | @Override
27 | public void run() {
28 | System.out.println("Thread calisiyor.");
29 |
30 | for(int i=0; i<50;i++){
31 | System.out.println("Thread2 : "+i);
32 | }
33 |
34 | try {
35 | Thread.sleep(1000);
36 | } catch (InterruptedException e) {
37 | e.printStackTrace();
38 | }
39 | }
40 | }).start();
41 |
42 | System.out.println("Main Thread calisiyor..");
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/composition_örnek2/Gövde.java:
--------------------------------------------------------------------------------
1 | public class Gövde {
2 |
3 | private int kapi_sayisi;
4 | private int ayna_sayisi;
5 | private int tekerlek_yedek_tekerlek_sayisi;
6 |
7 | public Gövde(int kapi_sayisi, int ayna_sayisi, int tekerlek_yedek_tekerlek_sayisi) {
8 | this.setKapi_sayisi(kapi_sayisi);
9 | this.setAyna_sayisi(ayna_sayisi);
10 | this.setTekerlek_yedek_tekerlek_sayisi(tekerlek_yedek_tekerlek_sayisi);
11 | }
12 |
13 | public int getKapi_sayisi() {
14 | return kapi_sayisi;
15 | }
16 |
17 | public void setKapi_sayisi(int kapi_sayisi) {
18 | this.kapi_sayisi = kapi_sayisi;
19 | }
20 |
21 | public int getAyna_sayisi() {
22 | return ayna_sayisi;
23 | }
24 |
25 | public void setAyna_sayisi(int ayna_sayisi) {
26 | this.ayna_sayisi = ayna_sayisi;
27 | }
28 |
29 | public int getTekerlek_yedek_tekerlek_sayisi() {
30 | return tekerlek_yedek_tekerlek_sayisi;
31 | }
32 |
33 | public void setTekerlek_yedek_tekerlek_sayisi(int tekerlek_yedek_tekerlek_sayisi) {
34 | this.tekerlek_yedek_tekerlek_sayisi = tekerlek_yedek_tekerlek_sayisi;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/composition_örnek2/Ic_alan.java:
--------------------------------------------------------------------------------
1 | public class Ic_alan {
2 |
3 | private int koltuk_sayisi;
4 | private int ic_hacim;
5 | private int cocuk_kilidi;
6 |
7 | public Ic_alan(int koltuk_sayisi, int ic_hacim, int cocuk_kilidi) {
8 | this.setKoltuk_sayisi(koltuk_sayisi);
9 | this.setIc_hacim(ic_hacim);
10 | this.setCocuk_kilidi(cocuk_kilidi);
11 | }
12 |
13 | public int getKoltuk_sayisi() {
14 | return koltuk_sayisi;
15 | }
16 |
17 | public void setKoltuk_sayisi(int koltuk_sayisi) {
18 | this.koltuk_sayisi = koltuk_sayisi;
19 | }
20 |
21 | public int getIc_hacim() {
22 | return ic_hacim;
23 | }
24 |
25 | public void setIc_hacim(int ic_hacim) {
26 | this.ic_hacim = ic_hacim;
27 | }
28 |
29 | public int getCocuk_kilidi() {
30 | return cocuk_kilidi;
31 | }
32 |
33 | public void setCocuk_kilidi(int cocuk_kilidi) {
34 | this.cocuk_kilidi = cocuk_kilidi;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/composition_örnek2/Iskelet.java:
--------------------------------------------------------------------------------
1 | public class Iskelet {
2 |
3 | private Motor motor;
4 | private Gövde gövde;
5 | private Ic_alan ic_alan;
6 |
7 | public Iskelet(Motor motor, Gövde gövde, Ic_alan ic_alan) {
8 | this.setMotor(motor);
9 | this.setGövde(gövde);
10 | this.setIc_alan(ic_alan);
11 | }
12 |
13 |
14 | public Motor getMotor() {
15 | return motor;
16 | }
17 |
18 | public void setMotor(Motor motor) {
19 | this.motor = motor;
20 | }
21 |
22 | public Gövde getGövde() {
23 | return gövde;
24 | }
25 |
26 | public void setGövde(Gövde gövde) {
27 | this.gövde = gövde;
28 | }
29 |
30 | public Ic_alan getIc_alan() {
31 | return ic_alan;
32 | }
33 |
34 | public void setIc_alan(Ic_alan ic_alan) {
35 | this.ic_alan = ic_alan;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/composition_örnek2/Motor.java:
--------------------------------------------------------------------------------
1 | public class Motor {
2 |
3 | private String motor_numarası;
4 | private int silindir_sayisi;
5 | private double beygir_gücü;
6 | private String motor_üretim_yeri;
7 |
8 | public Motor(String motor_numarası, int silindir_sayisi, double beygir_gücü, String motor_üretim_yeri) {
9 | this.setMotor_numarası(motor_numarası);
10 | this.setSilindir_sayisi(silindir_sayisi);
11 | this.setBeygir_gücü(beygir_gücü);
12 | this.setMotor_üretim_yeri(motor_üretim_yeri);
13 | }
14 |
15 | public String getMotor_numarası() {
16 | return motor_numarası;
17 | }
18 |
19 | public void setMotor_numarası(String motor_numarası) {
20 | this.motor_numarası = motor_numarası;
21 | }
22 |
23 | public int getSilindir_sayisi() {
24 | return silindir_sayisi;
25 | }
26 |
27 | public void setSilindir_sayisi(int silindir_sayisi) {
28 | this.silindir_sayisi = silindir_sayisi;
29 | }
30 |
31 | public double getBeygir_gücü() {
32 | return beygir_gücü;
33 | }
34 |
35 | public void setBeygir_gücü(double beygir_gücü) {
36 | this.beygir_gücü = beygir_gücü;
37 | }
38 |
39 | public String getMotor_üretim_yeri() {
40 | return motor_üretim_yeri;
41 | }
42 |
43 | public void setMotor_üretim_yeri(String motor_üretim_yeri) {
44 | this.motor_üretim_yeri = motor_üretim_yeri;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/composition_örnek2/main.java:
--------------------------------------------------------------------------------
1 | public class main {
2 |
3 | public static void main(String[] args){
4 |
5 | Motor motor = new Motor("1515897",4,600,"Konya");
6 | Gövde gövde = new Gövde(4,2,5);
7 | Ic_alan ic_alan = new Ic_alan(5,600,1);
8 |
9 | Iskelet iskelet = new Iskelet(motor, gövde, ic_alan);
10 |
11 |
12 | System.out.println("Arabanın kapı sayısı : " + iskelet.getGövde().getKapi_sayisi());
13 | System.out.println("Arabanın koltuk sayisi : " + iskelet.getIc_alan().getKoltuk_sayisi());
14 |
15 | }
16 |
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/thread/out/production/thread/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/thread/out/production/thread/Main.class
--------------------------------------------------------------------------------
/thread/out/production/thread/Printer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AhmetFurkanDEMIR/Java-Workouts/38678ed9a08b5faaf345b037a605037ff74938ca/thread/out/production/thread/Printer.class
--------------------------------------------------------------------------------
/thread/src/Main.java:
--------------------------------------------------------------------------------
1 | public class Main {
2 |
3 | public static void main(String[] args){
4 |
5 | Printer printer1 = new Printer("printer1");
6 | Printer printer2 = new Printer("printer2");
7 |
8 | printer1.start();
9 | printer2.start();
10 |
11 | System.out.println("Main Thread son buldu.");
12 |
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/thread/src/Printer.java:
--------------------------------------------------------------------------------
1 | public class Printer extends Thread {
2 |
3 | private String isim;
4 |
5 | public Printer(String ad){
6 |
7 | this.setIsim(ad);
8 |
9 | }
10 |
11 | public String getIsim() {
12 | return isim;
13 | }
14 |
15 |
16 | public void setIsim(String isim) {
17 | this.isim = isim;
18 | }
19 |
20 | @Override
21 | public void run() {
22 | System.out.println(isim + " Isim calisiyor");
23 |
24 | for(int i=0; i<20;i++){
25 | System.out.println(isim+" Yaziyor .. : "+i);
26 | }
27 |
28 | try {
29 | Thread.sleep(1000);
30 | } catch (InterruptedException e) {
31 | e.printStackTrace();
32 | }
33 |
34 | System.out.println(isim+" Isini bitirdi....");
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/thread/thread.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------