├── File-Creator ├── krishgaur1354.txt ├── Code-File.png ├── Output-File.png ├── Properties-Files.png ├── createfile.java └── README.md ├── Wall-Breaker ├── Code │ ├── img.md │ ├── mainbreaker.png │ ├── gameplaybreaker-1.png │ ├── gameplaybreaker-2.png │ ├── gameplaybreaker-3.png │ └── mapgeneratorbreaker.png ├── Demo-Png │ ├── README.md │ └── breaker-demo.png ├── Main.java ├── README.md ├── MapGenerator.java └── Gameplay.java ├── Email-Administration-Application ├── Mains.txt ├── CodePics │ ├── Mains.txt │ ├── Main-Code.png │ ├── App-Code-1.png │ ├── App-Code-2.png │ ├── App-Code-3.png │ ├── Main-Output.png │ └── README.md ├── Main.java ├── README.md └── Email.java ├── Factors ├── code.png ├── output.png ├── factors.java └── Readme.md ├── Array-3D ├── Code-Array.png ├── Output-Array.png ├── Array3D.java └── README.md ├── Bank-Statement ├── Code_1.png ├── Code_2.png └── Statement.java ├── Bubble-Sort ├── code-sort.png ├── output-sort.png ├── bubblesort.java └── README.md ├── Car-Gears ├── Code-Output.png ├── CodeGear-1.png ├── CodeGear-2.png ├── gears.kt ├── gears.java └── README.md ├── Fibonacci-Series ├── Output.png ├── Fibonacci_Code.java ├── Fibonacci_Main.java └── README.md ├── File-Writer ├── Code-Writer.png ├── Edited-Doc.png ├── Output-Writer.png ├── filewriter.java └── README.md ├── Fizz-Buzz ├── FizzBuzz-Code.png ├── Fiizbuzz Output.png ├── FizzBuzz.kt ├── FizzBuzz.java └── README.md ├── Armstrong-Numbers ├── Arm_Code.png ├── Arm_Output.png ├── Armstrong.kt ├── README.md └── Armstrong.java ├── Insertion-Sort ├── Code-Insert.png ├── Output - Insert.png ├── insertion.java └── README.md ├── Array-Lists ├── Arrayist-IntelliJ.png ├── Arrayist-Output.png ├── README.md └── Arraysist.java ├── Number-Guessing ├── Numberguess.png ├── README.md └── NumberGuessing.java ├── Summation-Of-Arrays ├── Summation-Code.png ├── Summation-Output.png ├── untitled.iml ├── Smmation.kt └── README.md ├── .gitignore ├── README.md ├── Patterns └── README.md ├── CONTRIBUTING.md └── Code-Of-Conduct.md /File-Creator/krishgaur1354.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Wall-Breaker/Code/img.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Wall-Breaker/Demo-Png/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Email-Administration-Application/Mains.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Email-Administration-Application/CodePics/Mains.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Factors/code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Factors/code.png -------------------------------------------------------------------------------- /Factors/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Factors/output.png -------------------------------------------------------------------------------- /Array-3D/Code-Array.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Array-3D/Code-Array.png -------------------------------------------------------------------------------- /Array-3D/Output-Array.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Array-3D/Output-Array.png -------------------------------------------------------------------------------- /Bank-Statement/Code_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Bank-Statement/Code_1.png -------------------------------------------------------------------------------- /Bank-Statement/Code_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Bank-Statement/Code_2.png -------------------------------------------------------------------------------- /Bubble-Sort/code-sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Bubble-Sort/code-sort.png -------------------------------------------------------------------------------- /Car-Gears/Code-Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Car-Gears/Code-Output.png -------------------------------------------------------------------------------- /Car-Gears/CodeGear-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Car-Gears/CodeGear-1.png -------------------------------------------------------------------------------- /Car-Gears/CodeGear-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Car-Gears/CodeGear-2.png -------------------------------------------------------------------------------- /Bubble-Sort/output-sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Bubble-Sort/output-sort.png -------------------------------------------------------------------------------- /Fibonacci-Series/Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Fibonacci-Series/Output.png -------------------------------------------------------------------------------- /File-Creator/Code-File.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/File-Creator/Code-File.png -------------------------------------------------------------------------------- /File-Creator/Output-File.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/File-Creator/Output-File.png -------------------------------------------------------------------------------- /File-Writer/Code-Writer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/File-Writer/Code-Writer.png -------------------------------------------------------------------------------- /File-Writer/Edited-Doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/File-Writer/Edited-Doc.png -------------------------------------------------------------------------------- /Fizz-Buzz/FizzBuzz-Code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Fizz-Buzz/FizzBuzz-Code.png -------------------------------------------------------------------------------- /Armstrong-Numbers/Arm_Code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Armstrong-Numbers/Arm_Code.png -------------------------------------------------------------------------------- /File-Writer/Output-Writer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/File-Writer/Output-Writer.png -------------------------------------------------------------------------------- /Fizz-Buzz/Fiizbuzz Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Fizz-Buzz/Fiizbuzz Output.png -------------------------------------------------------------------------------- /Insertion-Sort/Code-Insert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Insertion-Sort/Code-Insert.png -------------------------------------------------------------------------------- /Armstrong-Numbers/Arm_Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Armstrong-Numbers/Arm_Output.png -------------------------------------------------------------------------------- /Array-Lists/Arrayist-IntelliJ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Array-Lists/Arrayist-IntelliJ.png -------------------------------------------------------------------------------- /Array-Lists/Arrayist-Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Array-Lists/Arrayist-Output.png -------------------------------------------------------------------------------- /File-Creator/Properties-Files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/File-Creator/Properties-Files.png -------------------------------------------------------------------------------- /Number-Guessing/Numberguess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Number-Guessing/Numberguess.png -------------------------------------------------------------------------------- /Wall-Breaker/Code/mainbreaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Wall-Breaker/Code/mainbreaker.png -------------------------------------------------------------------------------- /Insertion-Sort/Output - Insert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Insertion-Sort/Output - Insert.png -------------------------------------------------------------------------------- /Summation-Of-Arrays/Summation-Code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Summation-Of-Arrays/Summation-Code.png -------------------------------------------------------------------------------- /Wall-Breaker/Demo-Png/breaker-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Wall-Breaker/Demo-Png/breaker-demo.png -------------------------------------------------------------------------------- /Summation-Of-Arrays/Summation-Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Summation-Of-Arrays/Summation-Output.png -------------------------------------------------------------------------------- /Wall-Breaker/Code/gameplaybreaker-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Wall-Breaker/Code/gameplaybreaker-1.png -------------------------------------------------------------------------------- /Wall-Breaker/Code/gameplaybreaker-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Wall-Breaker/Code/gameplaybreaker-2.png -------------------------------------------------------------------------------- /Wall-Breaker/Code/gameplaybreaker-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Wall-Breaker/Code/gameplaybreaker-3.png -------------------------------------------------------------------------------- /Wall-Breaker/Code/mapgeneratorbreaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Wall-Breaker/Code/mapgeneratorbreaker.png -------------------------------------------------------------------------------- /Email-Administration-Application/CodePics/Main-Code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Email-Administration-Application/CodePics/Main-Code.png -------------------------------------------------------------------------------- /Email-Administration-Application/CodePics/App-Code-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Email-Administration-Application/CodePics/App-Code-1.png -------------------------------------------------------------------------------- /Email-Administration-Application/CodePics/App-Code-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Email-Administration-Application/CodePics/App-Code-2.png -------------------------------------------------------------------------------- /Email-Administration-Application/CodePics/App-Code-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Email-Administration-Application/CodePics/App-Code-3.png -------------------------------------------------------------------------------- /Email-Administration-Application/CodePics/Main-Output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrishGaur1354/Java-Projects-for-Beginners/HEAD/Email-Administration-Application/CodePics/Main-Output.png -------------------------------------------------------------------------------- /Email-Administration-Application/CodePics/README.md: -------------------------------------------------------------------------------- 1 | ![Email-Administration-Application](https://socialify.git.ci/KrishGaur1354/Email-Administration-Application/image?font=Source%20Code%20Pro&language=1&name=1&owner=1&pattern=Charlie%20Brown&theme=Dark) 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | -------------------------------------------------------------------------------- /Factors/factors.java: -------------------------------------------------------------------------------- 1 | 2 | import java.util.Scanner; 3 | 4 | class Factors { 5 | public static void main(String[] args) { 6 | Scanner sc=new Scanner(System.in); 7 | System.out.print("Factors of a number : "); 8 | int n; 9 | n=sc.nextInt(); 10 | for(int i=1;i<=n;i++) 11 | { 12 | if(n%i==0) 13 | { 14 | System.out.println(i+"\n"); 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Fizz-Buzz/FizzBuzz.kt: -------------------------------------------------------------------------------- 1 | import java.util.* 2 | 3 | object FizzBuzz { 4 | @JvmStatic 5 | fun main(args: Array) { 6 | val input = Scanner(System.`in`) 7 | println("Enter no. to view FizzBuzz : ") 8 | val nums = input.nextInt() 9 | for (i in 1..nums) { 10 | if (i % 5 == 0 && i % 3 == 0) println("FizzBuzz") else if (i % 5 == 0) println("Buzz") else if (i % 3 == 0) println("Fizz") else println(i) 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Wall-Breaker/Main.java: -------------------------------------------------------------------------------- 1 | package brickBracker; 2 | 3 | import javax.swing.JFrame; 4 | 5 | public class Main { 6 | public static void main(String[] args) { 7 | JFrame obj = new JFrame(); 8 | Gameplay gamePlay = new Gameplay(); 9 | obj.setBounds(10,10,700,600); 10 | obj.setTitle("Breakout Ball"); 11 | obj.setResizable(false); 12 | obj.setVisible(true); 13 | obj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 14 | obj.add(gamePlay); 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Email-Administration-Application/Main.java: -------------------------------------------------------------------------------- 1 | package EmailApp; 2 | 3 | import java.util.Scanner; 4 | 5 | public class Main { 6 | public static void main(String[] args) { 7 | Scanner scn = new Scanner(System.in); 8 | System.out.print("Enter your First Name: "); 9 | String first = scn.next(); 10 | System.out.print("Enter your Last Name: "); 11 | String last = scn.next(); 12 | Email em1 = new Email(first,last); 13 | System.out.println(em1.showInfo()); 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Fibonacci-Series/Fibonacci_Code.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class Fibonacci_Code { 4 | public static void main(String[] args) { 5 | Scanner input = new Scanner(System.in); 6 | int num = input.nextInt(); 7 | int a = 0; 8 | int b = 1; 9 | int count = 2; 10 | 11 | while (count <= num) { 12 | int fib = b; 13 | b = a + b; 14 | a = fib; 15 | count++; 16 | } 17 | System.out.println(b); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Summation-Of-Arrays/untitled.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Array-3D/Array3D.java: -------------------------------------------------------------------------------- 1 | public class Array3D { 2 | public static void main(String[] args) { 3 | int threeD[][][] = new int[5][5][5] ; 4 | int i , j , k ; 5 | 6 | for( i = 0 ; i < 5 ; i++) 7 | for( j = 0 ; j < 5 ; j++) 8 | for( k = 0 ; k < 5 ; k++) 9 | threeD[i][j][k] = i * j * k ; 10 | 11 | for( i = 0 ; i < 5 ; i++) { 12 | for (j = 0; j < 5; j++) { 13 | for (k = 0; k < 5; k++) 14 | System.out.print(threeD[i][j][k] + " "); 15 | System.out.println(); 16 | } 17 | System.out.println(); 18 | } 19 | 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Fizz-Buzz/FizzBuzz.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class FizzBuzz { 4 | public static void main(String[] args) { 5 | Scanner input = new Scanner(System.in); 6 | System.out.println("Enter no. to view FizzBuzz : "); 7 | int num = input.nextInt(); 8 | 9 | for (int i = 1; i <= num ; i++) 10 | { 11 | if (i%5 == 0 && i%3 == 0) 12 | System.out.println("FizzBuzz"); 13 | else if (i%5==0) 14 | System.out.println("Buzz"); 15 | else if (i%3==0) 16 | System.out.println("Fizz"); 17 | else 18 | System.out.println(i); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Fibonacci-Series/Fibonacci_Main.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | class fibonacci { 4 | 5 | static int fib(int n) 6 | { 7 | int f[] = new int[n + 2]; 8 | int i; 9 | 10 | f[0] = 0; 11 | f[1] = 1; 12 | 13 | for (i = 2; i <= n; i++) { 14 | f[i] = f[i - 1] + f[i - 2]; 15 | } 16 | return f[n]; 17 | } 18 | 19 | public static void main(String args[]) { 20 | Scanner input = new Scanner(System.in); 21 | int num = input.nextInt(); 22 | 23 | for (int i = 0; i < num; i++) 24 | System.out.print(fib(i) + " "); 25 | } 26 | } -------------------------------------------------------------------------------- /Summation-Of-Arrays/Smmation.kt: -------------------------------------------------------------------------------- 1 | import java.util.* 2 | 3 | object Smmation { 4 | @JvmStatic 5 | fun main(args: Array) { 6 | val input = Scanner(System.`in`) 7 | print("Enter first Array: ") 8 | val n = input.nextInt() 9 | print("Enter second Array: ") 10 | val m = input.nextInt() 11 | var sum = 0 12 | val nums = Array(10) { IntArray(10) } 13 | for (i in 0 until n) for (j in 0 until m) nums[i][j] = (i + 1) * (j + 1) 14 | for (x in nums) { 15 | for (y in x) { 16 | println("Values are : $y") 17 | sum += y 18 | } 19 | } 20 | println("Summation of all values is : $sum") 21 | } 22 | } -------------------------------------------------------------------------------- /Armstrong-Numbers/Armstrong.kt: -------------------------------------------------------------------------------- 1 | import java.util.* 2 | 3 | object Armstrong { 4 | @JvmStatic 5 | fun main(args: Array) { 6 | val input = Scanner(System.`in`) 7 | val inp = input.nextInt() 8 | val ans = IsArmstrong(inp) 9 | println(ans) 10 | for (i in 0..999) { 11 | if (IsArmstrong(i)) { 12 | println("$i ") 13 | } 14 | } 15 | } 16 | 17 | fun IsArmstrong(inp: Int): Boolean { 18 | var inp = inp 19 | val num = inp 20 | var sum = 0 21 | while (inp > 0) { 22 | val remain = inp % 10 23 | inp = inp / 10 24 | sum = sum + remain * remain * remain 25 | } 26 | return sum == num 27 | } 28 | } -------------------------------------------------------------------------------- /Wall-Breaker/README.md: -------------------------------------------------------------------------------- 1 | # Brick Breaker 2 | 3 | A simple brick breaker game written in Java. 4 | 5 | 6 | # How to Play 7 | 8 | Use the left and right arrow keys to move the paddle and hit the ball to break the bricks. The game is over when all the bricks are broken or the ball hits the bottom of the screen. 9 | 10 | 11 | # Installation 12 | 13 | ### Clone the repository: 14 | 15 | ```git 16 | git clone https://github.com/KrishGaur1354/Java-Projects-for-Beginners/tree/main/Wall-Breaker 17 | ``` 18 | 19 | ### Compile the .java files: 20 | ```git 21 | javac *.java 22 | ``` 23 | 24 | ### Run the game: 25 | 26 | ```git 27 | java BrickBreaker 28 | ``` 29 | 30 | # Features 31 | 32 | - Multiple levels with increasing difficulty 33 | - Score tracking 34 | - Special bricks with unique abilities 35 | 36 | -------------------------------------------------------------------------------- /Fibonacci-Series/README.md: -------------------------------------------------------------------------------- 1 | 2 | ### Fibonacci-Series 3 | 4 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 5 | 6 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 7 | 8 | --- 9 | 10 | ## Connect with me 11 | 12 | 13 |   14 | 15 | 16 |   17 | 18 | --- 19 | -------------------------------------------------------------------------------- /File-Creator/createfile.java: -------------------------------------------------------------------------------- 1 | import java.io.File; 2 | import java.io.IOException; 3 | import java.util.Scanner; 4 | 5 | public class createfile { 6 | public static void main(String[] args) { 7 | Scanner scn = new Scanner(System.in); 8 | System.out.println("Enter Your File Name : "); 9 | String names = scn.next(); 10 | try{ 11 | File myObj = new File( names +".txt"); 12 | if (myObj.createNewFile()) { 13 | System.out.println("File Created : " + myObj.getName()); 14 | } else { 15 | System.out.println("File Already Exist"); 16 | } 17 | } catch (IOException e) { 18 | System.out.println("An error Occurred"); 19 | e.printStackTrace(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Insertion-Sort/insertion.java: -------------------------------------------------------------------------------- 1 | import java.util.Arrays; 2 | 3 | public class insertion { 4 | public static void main(String[] args) { 5 | int[] arr = { 10 , 15 , 20 , 5 , 25}; 6 | inserton(arr); 7 | System.out.println(Arrays.toString(arr)); 8 | } 9 | static void inserton(int[] arr) { 10 | for(int i = 0; i < arr.length - i; i++) { 11 | for(int j = i+1; j > 0; j--) { 12 | if(arr[j] < arr[j - 1]) { 13 | swap(arr, j, j - 1); 14 | } else { 15 | break; 16 | } 17 | } 18 | } 19 | } 20 | static void swap(int[] arr, int first, int second) { 21 | int change = arr[first]; 22 | arr[first] = arr[second]; 23 | arr[second] = change; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Array-3D/README.md: -------------------------------------------------------------------------------- 1 | 2 | ### Array-IN-3D 3 | 4 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 5 | 6 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 7 | 8 | --- 9 | 10 |

This is a Array-3D Code written in Java using IntelliJ Idea

11 | 12 | --- 13 | 14 | ## Connect with me 15 | 16 | 17 |   18 | 19 | 20 |   21 | 22 | -------------------------------------------------------------------------------- /Array-Lists/README.md: -------------------------------------------------------------------------------- 1 | ### Array-List 2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | 5 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 6 | 7 | --- 8 | 9 |

This is a Array-Lists Code written in Java using IntelliJ Idea

10 | 11 | --- 12 | 13 | ## Connect with me 14 | 15 | 16 |   17 | 18 | 19 |   20 | 21 | 22 | -------------------------------------------------------------------------------- /Bubble-Sort/bubblesort.java: -------------------------------------------------------------------------------- 1 | import java.util.Arrays; 2 | 3 | public class bubblesort { 4 | public static void main(String[] args) { 5 | int[] arr = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; 6 | bubble(arr); 7 | System.out.println(Arrays.toString(arr)); 8 | } 9 | static void bubble(int[] arr) { 10 | boolean swapped; 11 | for(int i = 0 ; i < arr.length ; i++){ 12 | swapped = false; 13 | for(int j = 1 ; j < arr.length - i ; j++) { 14 | if(arr[j] < arr[j-1]) { 15 | int change = arr[j]; 16 | arr[j] = arr[j-1]; 17 | arr[j-1] = change; 18 | swapped = true; 19 | } 20 | } 21 | if (!swapped) { 22 | break; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Armstrong-Numbers/README.md: -------------------------------------------------------------------------------- 1 | ### Armstrong-Numbers 2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | 5 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 6 | 7 | --- 8 | 9 |

This is a Armstrong Number Code written in Java using IntelliJ Idea

10 | 11 | --- 12 | 13 | ## Connect with me 14 | 15 | 16 |   17 | 18 | 19 |   20 | 21 | -------------------------------------------------------------------------------- /Fizz-Buzz/README.md: -------------------------------------------------------------------------------- 1 | ### Fizz-Buzz 2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | 5 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 6 | 7 | --- 8 | 9 |

This is a Fizz-Buzz Code written in Java using IntelliJ Idea. Code style similiar to Leetcode Programs.

10 | 11 | --- 12 | 13 | ## Connect with me 14 | 15 | 16 |   17 | 18 | 19 |   20 | -------------------------------------------------------------------------------- /Car-Gears/gears.kt: -------------------------------------------------------------------------------- 1 | internal open class Car(var gear: Int, var speed: Int) { 2 | fun applyBrake(decrement: Int) { 3 | speed -= decrement 4 | } 5 | 6 | fun speedUp(increment: Int) { 7 | speed += increment 8 | } 9 | 10 | override fun toString(): String { 11 | return "No. of gears are : $gear\nSpeed of SuperCar is : $speed mph" 12 | } 13 | } 14 | 15 | internal class SuperCar(gear: Int, speed: Int, var setHeight: Int) : Car(gear, speed) { 16 | fun setHeight(newValue: Int) { 17 | setHeight = newValue 18 | } 19 | 20 | override fun toString(): String { 21 | return """${super.toString()} 22 | Ride height is : $setHeight inch""" 23 | } 24 | } 25 | 26 | object gears { 27 | @JvmStatic 28 | fun main(args: Array) { 29 | val mb = SuperCar(5, 180, 15) 30 | println(mb.toString()) 31 | } 32 | } -------------------------------------------------------------------------------- /File-Writer/filewriter.java: -------------------------------------------------------------------------------- 1 | import java.io.File; 2 | import java.io.FileWriter; 3 | import java.io.IOException; 4 | import java.util.Scanner; 5 | 6 | public class filewriter { 7 | public static void main(String[] args) { 8 | Scanner scn = new Scanner(System.in); 9 | System.out.println("Enter File name to Write on."); 10 | System.out.print("File Name Here : "); 11 | String filesn = scn.next(); 12 | System.out.println("Enter what you need add here : "); 13 | String writen = scn.next(); 14 | try { 15 | FileWriter writer = new FileWriter(filesn + ".txt"); 16 | writer.write(writen); 17 | writer.close(); 18 | System.out.println("Successfully wrote to the file"); 19 | } catch (IOException e) { 20 | System.out.println("An Error Occurred"); 21 | e.printStackTrace(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Number-Guessing/README.md: -------------------------------------------------------------------------------- 1 | 2 | ### Number-Guessing-Game 3 | 4 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 5 | 6 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 7 | 8 | --- 9 | 10 |

Number Guessing game made with Java. Inspired by version made by GeeksForGeeks.Check out here!!

11 | 12 | --- 13 | 14 | ## Connect with me 15 | 16 | 17 |   18 | 19 | 20 |   21 | 22 | --- 23 | -------------------------------------------------------------------------------- /Armstrong-Numbers/Armstrong.java: -------------------------------------------------------------------------------- 1 | /*What is a Armstrong Number?*/ 2 | /*Well in case of an Armstrong number of 3 digits, the sum of cubes of each digits is equal to the number itself.*/ 3 | 4 | import java.util.Scanner; 5 | 6 | public class Armstrong { 7 | public static void main(String[] args) { 8 | Scanner input = new Scanner(System.in); 9 | int inp = input.nextInt(); 10 | boolean ans = IsArmstrong(inp); 11 | System.out.println(ans); 12 | 13 | 14 | for (int i = 0 ; i < 1000 ; i++) { 15 | if (IsArmstrong(i)) { 16 | System.out.println(i + " "); 17 | } 18 | 19 | 20 | } 21 | } 22 | static boolean IsArmstrong(int inp) { 23 | int num = inp; 24 | int sum = 0; 25 | 26 | while (inp > 0) { 27 | int remain = inp % 10; 28 | inp = inp / 10; 29 | sum = sum + remain * remain * remain; 30 | } 31 | return sum == num; 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /Array-Lists/Arraysist.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class Arraysist { 4 | public static void main(String[] args) { 5 | Scanner input = new Scanner(System.in); 6 | int twoD[][] = new int[10][] ; 7 | twoD[0] = new int[1] ; 8 | twoD[1] = new int[2] ; 9 | twoD[2] = new int[3] ; 10 | twoD[3] = new int[4] ; 11 | twoD[4] = new int[5] ; 12 | twoD[5] = new int[6] ; 13 | twoD[6] = new int[7] ; 14 | twoD[7] = new int[8] ; 15 | twoD[8] = new int[9] ; 16 | twoD[9] = new int[10] ; 17 | 18 | int i , j , k = 0 ; 19 | 20 | for( i = 0 ; i < 10 ; i++) 21 | for( j = 0 ; j < i + 1 ; j++) { 22 | twoD[i][j] = k ; 23 | k++ ; 24 | } 25 | 26 | for( i = 0 ; i < 10 ; i++) { 27 | for( j = 0 ; j < i + 1 ; j++) 28 | System.out.print(twoD[i][j] + " "); 29 | System.out.println(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Car-Gears/gears.java: -------------------------------------------------------------------------------- 1 | class Car { 2 | 3 | public int gear; 4 | public int speed; 5 | 6 | public Car(int gear , int speed) 7 | { 8 | this.gear = gear; 9 | this.speed = speed; 10 | } 11 | 12 | public void applyBrake(int decrement) 13 | { 14 | speed -= decrement; 15 | } 16 | 17 | public void speedUp(int increment) 18 | { 19 | speed += increment; 20 | } 21 | public String toString() 22 | { 23 | return("No. of gears are : " + gear + "\n" + "Speed of SuperCar is : " + speed + " mph"); 24 | } 25 | } 26 | 27 | class SuperCar extends Car { 28 | 29 | public int setHeight; 30 | public SuperCar(int gear, int speed, int rideHeight) 31 | 32 | { 33 | super(gear, speed); 34 | setHeight = rideHeight; 35 | } 36 | 37 | public void setHeight(int newValue) 38 | { 39 | setHeight = newValue; 40 | } 41 | @Override public String toString() 42 | { 43 | return (super.toString() + "\nRide height is : " + setHeight + " inch"); 44 | } 45 | } 46 | public class gears { 47 | public static void main(String[] args) { 48 | SuperCar mb = new SuperCar(5, 180, 15); 49 | System.out.println(mb.toString()); 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /Wall-Breaker/MapGenerator.java: -------------------------------------------------------------------------------- 1 | package brickBracker; 2 | 3 | import java.awt.*; 4 | import java.awt.Graphics2D; 5 | 6 | public class MapGenerator { 7 | public int map[][]; 8 | public int BrickWidth; 9 | public int BrickHeight; 10 | 11 | public MapGenerator(int row, int col) { 12 | map = new int[row][col]; 13 | for (int i = 0; i < map.length; i++) { 14 | for (int j = 0; j < map[0].length; j++) { 15 | map[i][j] = 1; 16 | } 17 | } 18 | BrickWidth = 540 / col; 19 | BrickHeight = 150 / row; 20 | } 21 | 22 | public void draw(Graphics2D g) { 23 | for (int i = 0; i < map.length; i++) { 24 | for (int j = 0; j < map[0].length; j++) { 25 | if (map[i][j] > 0) { 26 | g.setColor(Color.WHITE); 27 | g.fillRect(j * BrickWidth + 80, i * BrickHeight + 50, BrickWidth, BrickHeight); 28 | g.setStroke(new BasicStroke(3)); 29 | g.setColor(Color.black); 30 | g.drawRect(j * BrickWidth + 80, i * BrickHeight + 50, BrickWidth, BrickHeight); 31 | } 32 | } 33 | } 34 | } 35 | public void setBrickValue(int value, int row, int col) { 36 | map[row][col] = value; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Summation-Of-Arrays/README.md: -------------------------------------------------------------------------------- 1 | ### Summation-Of-Arrays 2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | ![Channel Views](https://img.shields.io/youtube/channel/views/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 5 | ![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 6 | ![Youtube Second channel subscribers](https://img.shields.io/youtube/channel/subscribers/UChVQCKleV_WKpQkPu_8nozw?style=social) 7 | ![Twitter Followers](https://img.shields.io/twitter/follow/ThatOneKrish?style=social) 8 | ![Github Profile](https://img.shields.io/github/followers/KrishGaur1354?style=social) 9 | 10 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 11 | 12 | --- 13 | 14 |

This is the Kotlin version of my Program. Original Java one will be Uploaded soon.

15 | 16 | --- 17 | 18 | ## Connect with me 19 | 20 | 21 |   22 | 23 | 24 |   25 | 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Java-Projects 2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | ![Channel Views](https://img.shields.io/youtube/channel/views/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 5 | ![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 6 | ![Youtube Second channel subscribers](https://img.shields.io/youtube/channel/subscribers/UChVQCKleV_WKpQkPu_8nozw?style=social) 7 | ![Twitter Followers](https://img.shields.io/twitter/follow/ThatOneKrish?style=social) 8 | ![Github Profile](https://img.shields.io/github/followers/KrishGaur1354?style=social) 9 | 10 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 11 | 12 | --- 13 | 14 |

Here, I will upload my Java Projects which are Useful especially if you're a Beginner or want coding ideas to Practice.

15 | 16 | --- 17 | 18 | ## Connect with me 19 | 20 | 21 |   22 | 23 | 24 |   25 | -------------------------------------------------------------------------------- /Patterns/README.md: -------------------------------------------------------------------------------- 1 | ## Java-Projects 2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | ![Channel Views](https://img.shields.io/youtube/channel/views/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 5 | ![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 6 | ![Youtube Second channel subscribers](https://img.shields.io/youtube/channel/subscribers/UChVQCKleV_WKpQkPu_8nozw?style=social) 7 | ![Twitter Followers](https://img.shields.io/twitter/follow/ThatOneKrish?style=social) 8 | ![Github Profile](https://img.shields.io/github/followers/KrishGaur1354?style=social) 9 | 10 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 11 | 12 | --- 13 | 14 |

Here, I will upload my Java Projects which are Useful especially if you're a Beginner or want coding ideas to Practice.

15 | 16 | --- 17 | 18 | ## Connect with me 19 | 20 | 21 |   22 | 23 | 24 |   25 | 26 | -------------------------------------------------------------------------------- /Car-Gears/README.md: -------------------------------------------------------------------------------- 1 | ### Car-Gears 2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | ![Channel Views](https://img.shields.io/youtube/channel/views/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 5 | ![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 6 | ![Youtube Second channel subscribers](https://img.shields.io/youtube/channel/subscribers/UChVQCKleV_WKpQkPu_8nozw?style=social) 7 | ![Twitter Followers](https://img.shields.io/twitter/follow/ThatOneKrish?style=social) 8 | ![Github Profile](https://img.shields.io/github/followers/KrishGaur1354?style=social) 9 | 10 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 11 | 12 | --- 13 | 14 |

Inspired by GeeksforGeeks Java code on Inheritance. Check it out here.

15 | 16 | --- 17 | 18 | ## Connect with me 19 | 20 | 21 |   22 | 23 | 24 |   25 | 26 | -------------------------------------------------------------------------------- /Factors/Readme.md: -------------------------------------------------------------------------------- 1 | ### Factors of a Number 2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | ![Channel Views](https://img.shields.io/youtube/channel/views/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 5 | ![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 6 | ![Youtube Second channel subscribers](https://img.shields.io/youtube/channel/subscribers/UChVQCKleV_WKpQkPu_8nozw?style=social) 7 | ![Twitter Followers](https://img.shields.io/twitter/follow/ThatOneKrish?style=social) 8 | ![Github Profile](https://img.shields.io/github/followers/KrishGaur1354?style=social) 9 | 10 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 11 | 12 | --- 13 | 14 |

Inspired by GeeksforGeeks Java code on Inheritance. Check it out here.

15 | 16 | --- 17 | 18 | ## Connect with me 19 | 20 | 21 |   22 | 23 | 24 |   25 | 26 | -------------------------------------------------------------------------------- /File-Writer/README.md: -------------------------------------------------------------------------------- 1 |

File-Writer

2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | ![Channel Views](https://img.shields.io/youtube/channel/views/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 5 | ![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 6 | ![Youtube Second channel subscribers](https://img.shields.io/youtube/channel/subscribers/UChVQCKleV_WKpQkPu_8nozw?style=social) 7 | ![Twitter Followers](https://img.shields.io/twitter/follow/ThatOneKrish?style=social) 8 | ![Github Profile](https://img.shields.io/github/followers/KrishGaur1354?style=social) 9 | 10 | ![Personal-Python-Projects](https://socialify.git.ci/KrishGaur1354/Personal-Python-Projects/image?font=Source%20Code%20Pro&language=1&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 11 | 12 | --- 13 | 14 |

Code for File writer

15 | 16 | 17 |

Output for File writer

18 | 19 | 20 | ## Connect with me 21 | 22 | 23 |   24 | 25 | 26 |   27 | -------------------------------------------------------------------------------- /Bubble-Sort/README.md: -------------------------------------------------------------------------------- 1 | ### Bubble-Sort 2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | ![Channel Views](https://img.shields.io/youtube/channel/views/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 5 | ![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 6 | ![Youtube Second channel subscribers](https://img.shields.io/youtube/channel/subscribers/UChVQCKleV_WKpQkPu_8nozw?style=social) 7 | ![Twitter Followers](https://img.shields.io/twitter/follow/ThatOneKrish?style=social) 8 | ![Github Profile](https://img.shields.io/github/followers/KrishGaur1354?style=social) 9 | 10 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 11 | 12 | --- 13 | 14 | ### Code : 15 | 16 | 17 | ### Output : 18 | 19 | 20 | --- 21 | 22 | ### Connect with me 23 | 24 | 25 |   26 | 27 | 28 |   29 | 30 | -------------------------------------------------------------------------------- /Insertion-Sort/README.md: -------------------------------------------------------------------------------- 1 | ## Insertion-Sort 2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | ![Channel Views](https://img.shields.io/youtube/channel/views/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 5 | ![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 6 | ![Youtube Second channel subscribers](https://img.shields.io/youtube/channel/subscribers/UChVQCKleV_WKpQkPu_8nozw?style=social) 7 | ![Twitter Followers](https://img.shields.io/twitter/follow/ThatOneKrish?style=social) 8 | ![Github Profile](https://img.shields.io/github/followers/KrishGaur1354?style=social) 9 | 10 | ![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 11 | 12 | --- 13 | 14 | ### Code : 15 | 16 | 17 | ### Output : 18 | 19 | 20 | --- 21 | 22 | ### Connect with me 23 | 24 | 25 |   26 | 27 | 28 |   29 | 30 | 31 | -------------------------------------------------------------------------------- /File-Creator/README.md: -------------------------------------------------------------------------------- 1 |

File-Creator

2 | 3 | ![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects) 4 | ![Channel Views](https://img.shields.io/youtube/channel/views/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 5 | ![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC1x1aok5Ji52Dw6G8_GN59Q?style=social) 6 | ![Youtube Second channel subscribers](https://img.shields.io/youtube/channel/subscribers/UChVQCKleV_WKpQkPu_8nozw?style=social) 7 | ![Twitter Followers](https://img.shields.io/twitter/follow/ThatOneKrish?style=social) 8 | ![Github Profile](https://img.shields.io/github/followers/KrishGaur1354?style=social) 9 | 10 | ![Personal-Python-Projects](https://socialify.git.ci/KrishGaur1354/Personal-Python-Projects/image?font=Source%20Code%20Pro&language=1&name=1&owner=1&pattern=Circuit%20Board&theme=Dark) 11 | 12 | --- 13 | 14 |

Code for File creator

15 | 16 | 17 |

Output for File created

18 | 19 | 20 |

Properties of File created

21 | 22 | 23 | ## Connect with me 24 | 25 | 26 |   27 | 28 | 29 |   30 | 31 | 32 | -------------------------------------------------------------------------------- /Number-Guessing/NumberGuessing.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class NumberGuessing { 4 | 5 | public static void guessingNumberGame() { 6 | Scanner sc = new Scanner(System.in); 7 | System.out.println("Enter maximum value till you can choose: " ); //To choose no from 1 to the no. choosen by the user 8 | int gui = sc.nextInt(); //Input-1 9 | int number = 1 + (int) (gui * Math.random()); 10 | System.out.println("Enter in how many attempts you think you can guess:" ); //No of attempts the thinks they can guess in 11 | int num = sc.nextInt(); //Input-2 12 | int i, guess; 13 | 14 | System.out.println("A number is chosen between 1 to " + gui + ". Guess the number within " + num + " trials." ); 15 | 16 | for (i = 0; i < num; i++) { 17 | System.out.println("Guess the number:"); 18 | guess = sc.nextInt(); //Input-3 19 | 20 | if (number == guess) { 21 | System.out.println("Congratulations! You guessed the number in " + i + " attempts" ); 22 | break; 23 | } else if (number > guess && i != num - 1) { 24 | System.out.println("The number is greater than " + guess ); 25 | } else if (number < guess && i != num - 1) { 26 | System.out.println("The number is less than " + guess ); 27 | } 28 | } 29 | 30 | if (i == num) { 31 | System.out.println("You have exhausted the no. of trials."); 32 | System.out.println("The number to guess was " + number ); 33 | } 34 | 35 | } 36 | 37 | public static void main(String[] args) { 38 | { 39 | guessingNumberGame(); 40 | } 41 | } 42 | } 43 | 44 | 45 | -------------------------------------------------------------------------------- /Email-Administration-Application/README.md: -------------------------------------------------------------------------------- 1 | # Email-Administration-Application 2 | 3 | A basic Java project focused on applying object-oriented design in a real world application. 4 | 5 | ### Project Aim 6 | You are an IT Support Administrator Specialist and are charged with the task of creating email accounts for new hires. 7 | 8 | Your application should do the following: 9 | - Generate an email with the following syntax: `firstname.lastname@department.company.com` 10 | - Determine the department (sales, development, accounting), if none leave blank 11 | - Generate a random String for a password 12 | - Have set methods to change the password, set the mailbox capacity, and define an alternate email address 13 | - Have get methods to display the name, email, and mailbox capacity 14 | 15 | ## CODE : 16 | 17 | ### MAIN CODE : 18 | ![mains](https://github.com/KrishGaur1354/Email-Administration-Application/blob/main/CodePics/Main-Code.png) 19 | 20 | ### APPLICATION CODE : 21 | ![app1](https://github.com/KrishGaur1354/Email-Administration-Application/blob/main/CodePics/App-Code-1.png) 22 | ![app2](https://github.com/KrishGaur1354/Email-Administration-Application/blob/main/CodePics/App-Code-2.png) 23 | ![app3](https://github.com/KrishGaur1354/Email-Administration-Application/blob/main/CodePics/App-Code-3.png) 24 | 25 | ### OUTPUT APPLICATION : 26 | ![out](https://github.com/KrishGaur1354/Email-Administration-Application/blob/main/CodePics/Main-Output.png) 27 | 28 | # CONNECT WITH ME : 29 | 30 | 31 |   32 | 33 | 34 |   35 | 36 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | _Welcome hackers! It is **awesome** to have you here! Before you start contributing to this project, make sure you read our [Code Of Conduct](https://github.com/OtacilioN/awesome-hacktoberfest-2018/blob/master/CODE_OF_CONDUCT.md), it is essential to make this inclusive and open to everyone, otherwise, it would not be awesome_ 4 | This repository was created to help developers get started with Open Source during [Hacktoberfest](https://hacktoberfest.digitalocean.com/). 5 | 6 | ## Have you found some awesome repositories participating in Hacktoberfest? 7 | 8 | Add them to this list so others can find them too and start contributing. However, make sure that these repositories are beginner-friendly! 9 | > NOTE: Check out `issues` labelled as `Hacktoberfest` and start contributing! 10 | 11 | ## Submitting a pull request 12 | 13 | 1. [Fork](https://github.com/OtacilioN/awesome-hacktoberfest-2018/fork) and clone the repository. 14 | 1. Create a new branch: `git checkout -b my-branch-name`. 15 | 1. Add your item in alphabetical order in a section or create a new section, if you are not sure about the appropriate section you can open an `issue` to discuss with the community. 16 | 1. Push to your fork and [submit a pull request](https://github.com/OtacilioN/awesome-hacktoberfest-2018/compare). 17 | > Tips: Make sure that you are submitting and committing things that are of quality substance, otherwise maintainers can invalidate your pull request 18 | > There are a lot of good websites that you can research before opening a request instead of just writing "cool" or "Hello World" 19 | 5. Pat yourself on the back and wait for your `pull request` to be reviewed and merged. 20 | 21 | ## Resources 22 | 23 | - [How to Start with Hacktoberfest](https://www.youtube.com/watch?v=4RvIFvmZA3o) 24 | - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) 25 | - [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) 26 | - [GitHub Help](https://help.github.com) 27 | - [Your first time with git and github](https://kbroman.org/github_tutorial/pages/first_time.html) 28 | - [Git Forks and Upstream-A beginners Guide](https://www.atlassian.com/git/tutorials/git-forks-and-upstreams) 29 | -------------------------------------------------------------------------------- /Bank-Statement/Statement.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class Statement { 4 | public static void main(String[] args) { 5 | Scanner scrn = new Scanner(System.in); 6 | System.out.print("Enter your Registered Name : "); 7 | String reginame = scrn.next(); 8 | System.out.print("Enter your Assigned user password : "); 9 | String passname = scrn.next(); 10 | state first = new state(reginame , passname); 11 | first.menu(); 12 | } 13 | } 14 | 15 | class state { 16 | Scanner stat = new Scanner(System.in); 17 | String nam; 18 | String ids; 19 | 20 | state(String names, String identity) { 21 | nam = names; 22 | ids = identity; 23 | } 24 | 25 | 26 | void menu() { 27 | int option; 28 | System.out.println("Welcome " + nam); 29 | 30 | do { 31 | System.out.println("====================================================="); 32 | System.out.print("Enter your Account No: "); 33 | option = stat.nextInt(); 34 | System.out.println("====================================================="); 35 | 36 | switch (option) { 37 | case 1 -> { 38 | System.out.println("======================================================"); 39 | System.out.println("Balance: 10000 "); 40 | System.out.println("======================================================"); 41 | System.out.println("\n"); 42 | } 43 | case 2 -> { 44 | System.out.println("======================================================"); 45 | System.out.println("Balance: 20000 "); 46 | System.out.println("======================================================"); 47 | System.out.println("\n"); 48 | } 49 | case 3 -> { 50 | System.out.println("======================================================"); 51 | System.out.println("Balance: 30000 "); 52 | System.out.println("======================================================"); 53 | System.out.println("\n"); 54 | } 55 | case 4 -> { 56 | System.out.println("======================================================"); 57 | System.out.println("Balance: 50000 "); 58 | System.out.println("======================================================"); 59 | System.out.println("\n"); 60 | } 61 | default -> System.out.println("Invalid Account Number"); 62 | } 63 | } while(option == 0); 64 | System.out.println("Kindly Re-Run to View Details about other account"); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Email-Administration-Application/Email.java: -------------------------------------------------------------------------------- 1 | package EmailApp; 2 | 3 | import java.util.Scanner; 4 | import java.util.Random; 5 | 6 | public class Email { 7 | private String firstName; 8 | private String lastName; 9 | private String password; 10 | private String department; 11 | private String email; 12 | private int mailboxCapacity = 500; 13 | private int defaultpasswordlength = 10; 14 | private String alternateEmail; 15 | private String companyweb = "krishgaur.co"; 16 | 17 | public Email(String firstName, String lastName) { 18 | this.firstName = firstName; 19 | this.lastName = lastName; 20 | System.out.println("Email Created: " + this.firstName + " " + this.lastName); 21 | this.department = setDepartment(); 22 | email = firstName.toLowerCase() + "." + lastName.toLowerCase() + "@" + department + "." + companyweb; 23 | this.password = randomPassword(defaultpasswordlength); 24 | 25 | } 26 | 27 | private String setDepartment() { 28 | System.out.print("Department Codes\n1 For Sales\n2 for Development\n3 for Account\n0 for None\nEnter Department Code: "); 29 | Scanner scn = new Scanner(System.in); 30 | int depChoice = scn.nextInt(); 31 | switch (depChoice) { 32 | case 1: 33 | return "sales"; 34 | case 2: 35 | return "dev"; 36 | case 3: 37 | return "acc"; 38 | case 0: 39 | return ""; 40 | } 41 | return new String("***INVALID CHOICE***"); 42 | } 43 | 44 | private String randomPassword(int length) { 45 | Random r = new Random(); 46 | 47 | String Capital_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 48 | String Small_chars = "abcdefghijklmnopqrstuvwxyz"; 49 | String numbers = "0123456789"; 50 | String symbols = "!@#$%&?"; 51 | String values = Capital_chars + Small_chars + numbers + symbols; 52 | 53 | String password = ""; 54 | for (int i = 0; i < length; i++) { 55 | password = password + values.charAt(r.nextInt(values.length())); 56 | } 57 | return password; 58 | } 59 | 60 | public void setMailboxCapacity(int capacity) { 61 | this.mailboxCapacity = capacity; 62 | } 63 | 64 | public void setAlternateEmail(String alternateEmail) { 65 | this.alternateEmail = alternateEmail; 66 | } 67 | 68 | private void changePassword(String password) { 69 | this.password = password; 70 | } 71 | 72 | public int getMailboxCapacity() {return mailboxCapacity;} 73 | public String getAlternateEmail() {return alternateEmail;} 74 | public String getPassword() {return password;} 75 | 76 | public String showInfo() { 77 | return "Display Name: " + firstName + lastName + 78 | "\nDepartment: " + this.department + 79 | "\nCompany Email: " + email + 80 | "\nCompany Email Password:" + this.password + 81 | "\nMailbox Capacity: " + mailboxCapacity + "mb"; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Code-Of-Conduct.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behaviour that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | * Listen to everyone’s ideas 17 | 18 | Examples of unacceptable behaviour by participants include: 19 | 20 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 21 | * Trolling, insulting/derogatory comments, and personal or political attacks 22 | * Public or private harassment 23 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 24 | * Other conduct which could reasonably be considered inappropriate in a professional setting 25 | 26 | ## Our Responsibilities 27 | 28 | Project maintainers are responsible for clarifying the standards of acceptable behaviour and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. 29 | 30 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 31 | 32 | ## Scope 33 | 34 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 35 | 36 | ## Enforcement 37 | 38 | Instances of abusive, harassing or otherwise unacceptable behaviour may be reported by contacting the project team at krishgaur13@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality about the reporter of an incident. Further details of specific enforcement policies may be posted separately. 39 | 40 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 41 | 42 | ## Attribution 43 | 44 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 45 | 46 | [homepage]: http://contributor-covenant.org 47 | [version]: http://contributor-covenant.org/version/1/4/ 48 | -------------------------------------------------------------------------------- /Wall-Breaker/Gameplay.java: -------------------------------------------------------------------------------- 1 | package brickBracker; 2 | 3 | import javax.swing.*; 4 | import javax.swing.Timer; 5 | import java.awt.*; 6 | import java.awt.event.ActionEvent; 7 | import java.awt.event.ActionListener; 8 | import java.awt.event.KeyEvent; 9 | import java.awt.event.KeyListener; 10 | 11 | public class Gameplay extends JPanel implements KeyListener, ActionListener { 12 | private boolean play = false; 13 | private int score = 0; 14 | private int totalBricks = 21; 15 | private Timer time; 16 | private int delay = 8; 17 | private int playerX = 310; 18 | private int ballposX = 120; 19 | private int ballposY = 350; 20 | private int ballXdir = -1; 21 | private int ballYdir = -2; 22 | private MapGenerator map; 23 | 24 | public Gameplay() { 25 | map = new MapGenerator(3,7); 26 | addKeyListener(this); 27 | setFocusable(true); 28 | setFocusTraversalKeysEnabled(false); 29 | time = new Timer(delay, this); 30 | time.start(); 31 | } 32 | 33 | public void paint(Graphics g){ 34 | //Background 35 | g.setColor(Color.BLACK); 36 | g.fillRect(1,1,692,592); 37 | 38 | //drawing 39 | map.draw((Graphics2D)g); 40 | 41 | //Borders 42 | g.setColor(Color.WHITE); 43 | g.fillRect(0,0,3,592); 44 | g.fillRect(0,0,692,3); 45 | g.fillRect(691,0,3,592); 46 | 47 | //Scores 48 | g.setColor(Color.WHITE); 49 | g.setFont(new Font("ariel", Font.BOLD,25)); 50 | g.drawString("Your Score: ", 420,30); 51 | g.drawString(""+score,590,30); 52 | 53 | 54 | //Paddle 55 | g.setColor(Color.GREEN); 56 | g.fillRect(playerX,550,100,8); 57 | 58 | //Ball 59 | g.setColor(Color.RED); 60 | g.fillOval(ballposX,ballposY,20,20); 61 | 62 | if(totalBricks <= 0) { 63 | play = false; 64 | ballXdir=0; 65 | ballYdir=0; 66 | g.setColor(Color.GREEN); 67 | g.setFont(new Font("ariel",Font.BOLD,30)); 68 | g.drawString("You Won: " , 260, 300); 69 | g.setColor(Color.WHITE); 70 | g.drawString(""+score,500,300); 71 | 72 | g.setFont(new Font("ariel",Font.BOLD,20)); 73 | g.drawString("Press Enter to Restart" , 230, 350); 74 | } 75 | 76 | if(ballposY > 570){ 77 | play = false; 78 | ballXdir=0; 79 | ballYdir=0; 80 | g.setColor(Color.RED); 81 | g.setFont(new Font("ariel",Font.BOLD,30)); 82 | g.drawString("Game Over!, Scores: " , 190, 300); 83 | g.setColor(Color.WHITE); 84 | g.drawString(""+score,500,300); 85 | 86 | g.setFont(new Font("ariel",Font.BOLD,20)); 87 | g.drawString("Press Enter to Restart" , 230, 350); 88 | } 89 | 90 | g.dispose(); 91 | } 92 | 93 | 94 | @Override 95 | public void actionPerformed(ActionEvent e) { 96 | time.start(); 97 | if(play) { 98 | if(new Rectangle(ballposX,ballposY,20,20).intersects(new Rectangle(playerX,550,100,8))){ 99 | ballYdir = -ballYdir; 100 | } 101 | A: for(int i =0; i < map.map.length; i++){ 102 | for(int j = 0; j < map.map[0].length ; j++) { 103 | if(map.map[i][j] > 0) { 104 | int brickX = j * map.BrickWidth + 80; 105 | int brickY = i * map.BrickHeight + 50; 106 | int BrickWidth = map.BrickWidth; 107 | int BrickHeight = map.BrickHeight; 108 | 109 | Rectangle rect = new Rectangle(brickX, brickY, BrickWidth,BrickHeight); 110 | Rectangle ballRect = new Rectangle(ballposX, ballposY, 20,20); 111 | Rectangle brickRect = rect; 112 | 113 | if(ballRect.intersects(brickRect)){ 114 | map.setBrickValue(0,i,j); 115 | totalBricks--; 116 | score += 5; 117 | 118 | if(ballposX + 19 <= brickRect.x || ballposX + 1 >= brickRect.x + brickRect.width) { 119 | ballXdir = -ballXdir; 120 | }else { 121 | ballYdir = -ballYdir; 122 | } 123 | } 124 | } 125 | } 126 | } 127 | ballposX += ballXdir; 128 | ballposY += ballYdir; 129 | if(ballposX < 0){ 130 | ballXdir = -ballXdir; 131 | } 132 | if(ballposY < 0){ 133 | ballYdir = -ballYdir; 134 | } 135 | if(ballposX > 670){ 136 | ballXdir = -ballXdir; 137 | } 138 | } 139 | repaint(); 140 | } 141 | 142 | @Override 143 | public void keyTyped(KeyEvent e) {} 144 | @Override 145 | public void keyPressed(KeyEvent e) { 146 | if(e.getKeyCode() == KeyEvent.VK_RIGHT){ 147 | if(playerX >= 600) { 148 | playerX = 600; 149 | }else{ 150 | moveRight(); 151 | } 152 | } 153 | if(e.getKeyCode() == KeyEvent.VK_LEFT){ 154 | if(playerX < 10) { 155 | playerX = 10; 156 | }else{ 157 | moveLeft(); 158 | } 159 | } 160 | if(e.getKeyCode() == KeyEvent.VK_ENTER){ 161 | if(!play) { 162 | play = true; 163 | ballposX = 120; 164 | ballposY = 350; 165 | ballXdir = -1; 166 | ballYdir = -2; 167 | playerX = 310; 168 | score = 0; 169 | totalBricks = 21; 170 | map = new MapGenerator(3,7); 171 | } 172 | } 173 | } 174 | public void moveRight() { 175 | play = true; 176 | playerX+=20; 177 | } 178 | public void moveLeft() { 179 | play = true; 180 | playerX-=20; 181 | } 182 | @Override 183 | public void keyReleased(KeyEvent e) {} 184 | } 185 | --------------------------------------------------------------------------------