Skip to content

Commit 9b14a37

Browse files
Gradle init...
1 parent 6ebc195 commit 9b14a37

File tree

217 files changed

+142
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+142
-3
lines changed
File renamed without changes.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package info.doula.oop;
2+
3+
/**
4+
* Mohammed Hossain Doula
5+
*
6+
* @hossaindoula | @itconquest
7+
* <p>
8+
* http://hossaindoula.com
9+
* <p>
10+
* https://github.com/hossaindoula
11+
*/
12+
public class AnimalLivingBeing extends LivingBeing {
13+
14+
{
15+
weight = 10; //super class' instance properties / field / variable overriding
16+
height = 165;
17+
}
18+
19+
public AnimalLivingBeing(){
20+
21+
} //JVM will create this by default if I don't create it, then that would be called as a default constructor
22+
23+
//UpperCamelCase
24+
//lowerCamelCase
25+
26+
//ClassNameShouldBeInUpperCamelCase
27+
//variableNameShouldBeInLowerCamelCase
28+
//methodNameShouldBeInLowerCamelCase
29+
//functionNameShouldBeInLowerCamelCase
30+
31+
//Method overriding
32+
public int calculateDimension() {
33+
return weight * height;
34+
}
35+
}
36+
37+
class Mammal {
38+
39+
}

src/java/info/doula/oop/AssociatedClass.java renamed to src/main/java/info/doula/oop/AssociatedClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//package info.doula.oop;
1+
package info.doula.oop;
22

33
/**
44
* Mohammed Hossain Doula

src/java/info/doula/oop/BaseClass.java renamed to src/main/java/info/doula/oop/BaseClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//package info.doula.oop;
1+
package info.doula.oop;
22

33
/**
44
* Mohammed Hossain Doula
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package info.doula.oop;
2+
3+
/**
4+
* Mohammed Hossain Doula
5+
*
6+
* @hossaindoula | @itconquest
7+
* <p>
8+
* http://hossaindoula.com
9+
* <p>
10+
* https://github.com/hossaindoula
11+
*/
12+
public class Calculation {
13+
14+
static int sum(int a, int b) {
15+
return a + b;
16+
}
17+
18+
static int sum(int a, int b, int c) {
19+
return a + b + c;
20+
}
21+
22+
static int sum(int a, int b, int c, int d) {
23+
return a + b + c + d;
24+
}
25+
26+
static int sum(int a, int b, int c, int d, int e) {
27+
return a + b + c + d + e;
28+
}
29+
30+
public static void main(String[] args) {
31+
System.out.println("The summation of 5 and 9 is : " + sum(5, 9));
32+
System.out.println("The summation of 10, 9, 18 and 20 is : " + sum(10, 9, 18, 20));
33+
}
34+
}

src/java/info/doula/oop/DerivedClass.java renamed to src/main/java/info/doula/oop/DerivedClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//package info.doula.oop;
1+
package info.doula.oop;
22

33
/**
44
* Mohammed Hossain Doula
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package info.doula.oop;
2+
3+
4+
/**
5+
* Mohammed Hossain Doula
6+
*
7+
* @hossaindoula | @itconquest
8+
* <p>
9+
* http://hossaindoula.com
10+
* <p>
11+
* https://github.com/hossaindoula
12+
*/
13+
public class LivingBeing {
14+
int weight = 50;
15+
int height;
16+
17+
public int calculateDimension() {
18+
return weight + height;
19+
}
20+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package info.doula.oop;
2+
3+
/**
4+
* Mohammed Hossain Doula
5+
*
6+
* @hossaindoula | @itconquest
7+
* <p>
8+
* http://hossaindoula.com
9+
* <p>
10+
* https://github.com/hossaindoula
11+
*/
12+
public class MethodDetails {
13+
14+
static int sum(int a, int b) {
15+
return a + b;
16+
}
17+
18+
public static void main(String[] args) {
19+
int a = sum(5, 6);
20+
int b = sum(sum(7, 2), a);
21+
22+
System.out.println("The value of a is : " + a);
23+
System.out.println("The value of b is : " + b);
24+
}
25+
26+
27+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package info.doula.oop;
2+
3+
/**
4+
* Mohammed Hossain Doula
5+
*
6+
* @hossaindoula | @itconquest
7+
* <p>
8+
* http://hossaindoula.com
9+
* <p>
10+
* https://github.com/hossaindoula
11+
*/
12+
public class RunnerExec {
13+
public static void main(String[] args) {
14+
AnimalLivingBeing animal = new AnimalLivingBeing();
15+
LivingBeing being = new LivingBeing();
16+
System.out.println("The dimension animalLivingBeing is : " + animal.calculateDimension());
17+
System.out.println("The dimension of being is : " + being.calculateDimension());
18+
}
19+
}

0 commit comments

Comments
 (0)