Skip to content

Commit

Permalink
52 53
Browse files Browse the repository at this point in the history
  • Loading branch information
codershiyar committed May 15, 2020
1 parent d8a14d5 commit 8f807ae
Show file tree
Hide file tree
Showing 14 changed files with 122 additions and 36 deletions.
18 changes: 18 additions & 0 deletions Lesson 52 - الدرس/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"configurations": [
{
"type": "java",
"name": "CodeLens (Launch) - App",
"request": "launch",
"mainClass": "Java.App",
"projectName": "java_c87954b4"
},
{
"type": "java",
"name": "CodeLens (Launch) - App",
"request": "launch",
"mainClass": "App",
"projectName": "java_c87954b4"
}
]
}
11 changes: 11 additions & 0 deletions Lesson 52 - الدرس/Java/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"configurations": [
{
"type": "java",
"name": "CodeLens (Launch) - App",
"request": "launch",
"mainClass": "Java.App",
"projectName": "Java_281ceabd"
}
]
}
19 changes: 0 additions & 19 deletions Lesson 52 - الدرس/Java/App.java

This file was deleted.

7 changes: 0 additions & 7 deletions Lesson 52 - الدرس/Java/App2.java

This file was deleted.

5 changes: 0 additions & 5 deletions Lesson 52 - الدرس/Java/App3.java

This file was deleted.

5 changes: 0 additions & 5 deletions Lesson 52 - الدرس/Java/App4.java

This file was deleted.

19 changes: 19 additions & 0 deletions Lesson 52 - الدرس/Java/Java/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package Java;
// extends + implements معنى

// extends = مدد او رث
// يعني مدد الكلاس مع كلاس أخر - او اجعل يرث الكلاس من كلاس اخر

// implements - زود
// يعني تزويد الكلاس بإنترفيس

class App extends App2 implements Color , Background {
public static void main(String[] args) {
System.out.println(App.name);
}
}


class App2{
static String name = "Coder Shiyar";
}
5 changes: 5 additions & 0 deletions Lesson 52 - الدرس/Java/Java/Background.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package Java;

public interface Background {

}
5 changes: 5 additions & 0 deletions Lesson 52 - الدرس/Java/Java/Color.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package Java;

public interface Color {

}
18 changes: 18 additions & 0 deletions Lesson 53 - الدرس/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"configurations": [
{
"type": "java",
"name": "CodeLens (Launch) - App",
"request": "launch",
"mainClass": "Java.App",
"projectName": "java_c87954b4"
},
{
"type": "java",
"name": "CodeLens (Launch) - App",
"request": "launch",
"mainClass": "App",
"projectName": "java_c87954b4"
}
]
}
11 changes: 11 additions & 0 deletions Lesson 53 - الدرس/Java/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"configurations": [
{
"type": "java",
"name": "CodeLens (Launch) - App",
"request": "launch",
"mainClass": "Java.App",
"projectName": "Java_281ceabd"
}
]
}
28 changes: 28 additions & 0 deletions Lesson 53 - الدرس/Java/Java/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package Java;

class App implements AppInterface{
@Override
public void setName(String name){
System.out.println("الأسم: "+ name);
System.out.println(App.course_name);
};

public static void setName2(String name){
System.out.println("الأسم: "+ name);
System.out.println(App.course_name);
}
public static void main(String[] args) {
App app = new App();
// app.setName("Coder Shiyar");

App.setName2("Coder Shiyar");

AppInterface appInterface = new AppInterface(){
public void setName(String name){
System.out.println(name);
};
};

appInterface.setName("تم تنفيذ اوامر من داخل انترفيس اوبجكت غير نظامي");
}
}
7 changes: 7 additions & 0 deletions Lesson 53 - الدرس/Java/Java/AppInterface.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package Java;

public interface AppInterface {

String course_name = "دورة جافا";
public void setName(String name);
}
Binary file not shown.

0 comments on commit 8f807ae

Please sign in to comment.