Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/junit_4_13_2_javadoc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Beginner/Beginner.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/gui" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
11 changes: 11 additions & 0 deletions Beginner/Project1_ToDoList/Lesson10/Lesson10.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
11 changes: 11 additions & 0 deletions Beginner/Project1_ToDoList/Lesson11/Lesson11.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
11 changes: 11 additions & 0 deletions Beginner/Project1_ToDoList/Lesson2/Lesson2.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
// HelloWorld.java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}

// DataTypesExample.java
public class DataTypesExample {
public static void main(String[] args) {
Expand All @@ -15,7 +8,7 @@ public static void main(String[] args) {
// Displaying values
System.out.println("Age: " + age);
System.out.println("Name: " + NAME);

// Example of primitive data types
byte byteValue = 100;
short shortValue = 1000;
Expand All @@ -37,17 +30,17 @@ public static void main(String[] args) {
}

/*
* Output:
* Age: 22
* Name: Nipuna
* Byte Value: 100
* Short Value: 1000
* Long Value: 100000
* Float Value: 10.5
* Double Value: 20.99
* Char Value: A
* Boolean Value: true
*/
* Output:
* Age: 22
* Name: Nipuna
* Byte Value: 100
* Short Value: 1000
* Long Value: 100000
* Float Value: 10.5
* Double Value: 20.99
* Char Value: A
* Boolean Value: true
*/

/*
Summary
Expand Down
7 changes: 7 additions & 0 deletions Beginner/Project1_ToDoList/Lesson2/src/HelloWorld.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// HelloWorld.java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}

11 changes: 11 additions & 0 deletions Beginner/Project1_ToDoList/Lesson3/Lesson3.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/*
1. ControlFlowExample.java
This file demonstrates the use of conditional statements, including `if`, `else if`, `else`, and `switch`.
*/

// ControlFlowExample.java

public class ControlFlowExample {
public static void main(String[] args) {
// Conditional Statements
Expand Down Expand Up @@ -36,38 +32,6 @@ public static void main(String[] args) {
}
}

/*
2. LoopsExample.java
This file illustrates the different looping structures in Java: `for`, `while`, and `do-while` loops.
*/

// LoopsExample.java
public class LoopsExample {
public static void main(String[] args) {
// For Loop
System.out.println("For Loop:");
for (int i = 0; i < 5; i++) {
System.out.println("Iteration: " + i);
}

// While Loop
System.out.println("\nWhile Loop:");
int j = 0;
while (j < 5) {
System.out.println("Iteration: " + j);
j++;
}

// Do-While Loop
System.out.println("\nDo-While Loop:");
int k = 0;
do {
System.out.println("Iteration: " + k);
k++;
} while (k < 5);
}
}


/*
Summary
Expand Down
40 changes: 40 additions & 0 deletions Beginner/Project1_ToDoList/Lesson3/src/LoopsExample.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

/*
2. LoopsExample.java
This file illustrates the different looping structures in Java: `for`, `while`, and `do-while` loops.
*/

// LoopsExample.java
public class LoopsExample {
public static void main(String[] args) {
// For Loop
System.out.println("For Loop:");
for (int i = 0; i < 5; i++) {
System.out.println("Iteration: " + i);
}

// While Loop
System.out.println("\nWhile Loop:");
int j = 0;
while (j < 5) {
System.out.println("Iteration: " + j);
j++;
}

// Do-While Loop
System.out.println("\nDo-While Loop:");
int k = 0;
do {
System.out.println("Iteration: " + k);
k++;
} while (k < 5);
}
}


/*
Summary
- ControlFlowExample.java demonstrates how to use conditional statements and a switch statement.
- LoopsExample.java illustrates the use of `for`, `while`, and `do-while` loops.
- These examples provide a foundation for understanding control flow and looping structures in Java.
*/
11 changes: 11 additions & 0 deletions Beginner/Project1_ToDoList/Lesson4/Lesson4.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
24 changes: 24 additions & 0 deletions Beginner/Project1_ToDoList/Lesson4/src/FunctionExample.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// FunctionExample.java
public class FunctionExample {

// Method to add two integers
public int add(int a, int b) {
return a + b;
}

// Method to display user information
public void displayInfo(String name, int age) {
System.out.println("Name: " + name + ", Age: " + age);
}

public static void main(String[] args) {
FunctionExample example = new FunctionExample(); // Create an instance of the class

// Invoking the add method
int sum = example.add(5, 10);
System.out.println("Sum: " + sum); // Output: Sum: 15

// Invoking the displayInfo method
example.displayInfo("John", 25);
}
}
Original file line number Diff line number Diff line change
@@ -1,39 +1,5 @@
/*
1. FunctionExample.java
This file demonstrates how to define, invoke, and work with methods, including using parameters and return types.
*/

// FunctionExample.java
public class FunctionExample {

// Method to add two integers
public int add(int a, int b) {
return a + b;
}

// Method to display user information
public void displayInfo(String name, int age) {
System.out.println("Name: " + name + ", Age: " + age);
}

public static void main(String[] args) {
FunctionExample example = new FunctionExample(); // Create an instance of the class

// Invoking the add method
int sum = example.add(5, 10);
System.out.println("Sum: " + sum); // Output: Sum: 15

// Invoking the displayInfo method
example.displayInfo("John", 25);
}
}

/*
2. MethodOverloadingExample.java
This file illustrates method overloading by defining multiple methods with the same name but different parameters.
*/

// MethodOverloadingExample.java

public class MethodOverloadingExample {

// Overloaded method to multiply two integers
Expand Down
11 changes: 11 additions & 0 deletions Beginner/Project1_ToDoList/Lesson5/Lesson5.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
11 changes: 11 additions & 0 deletions Beginner/Project1_ToDoList/Lesson6/Lesson6.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
11 changes: 11 additions & 0 deletions Beginner/Project1_ToDoList/Lesson7/Lesson7.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Loading