From 056d1fbfd85250167276dd4a0e417d26b64847ab Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 22 Oct 2020 22:19:08 +1030 Subject: [PATCH] Refactor the project #71 Created maven modules for code that didnt have them. --- BinaryTrees/pom.xml | 15 ++ .../{ => src/main/java}/MirrorTree.java | 0 BubbleSort/pom.xml | 15 ++ .../{ => src/main/java}/BubbleSort.java | 0 CodeQuotient2/pom.xml | 15 ++ .../src/main/java}/Student.java | 2 - .../src/main/java}/TimeSpan.java | 2 - .../src/main/java}/add1toeachDigit.java | 2 - .../src/main/java}/aggMarks.java | 2 - .../src/main/java}/classRectangle.java | 2 - .../src/main/java}/cmpareReverse.java | 2 - .../src/main/java}/evenodd.java | 2 - .../src/main/java}/factorial.java | 2 - .../src/main/java}/hra.java | 2 - .../src/main/java}/kaperker.java | 3 - .../src/main/java}/leapYear.java | 2 - .../src/main/java}/matrixMultiplication.java | 2 - .../src/main/java}/max.java | 2 - .../src/main/java}/maxElement.java | 3 - .../src/main/java}/multiplication.java | 2 - .../src/main/java}/primenum.java | 2 - .../src/main/java}/sumArray.java | 2 - .../src/main/java}/sumofn.java | 2 - .../src/main/java}/swap.java | 2 - EuclieanDistance/pom.xml | 15 ++ .../{ => src/main/java}/EuclieanDistance.java | 0 GuessTheMovieGame/pom.xml | 15 ++ .../src/main/java}/Game.java | 0 .../src/main/java}/GuessTheMovie.java | 0 .../src/main/java}/Movie.java | 2 +- .../src/main/resources}/movies.txt | 0 GuessingNumberGame/pom.xml | 15 ++ .../java}/Guessing_Game_Human_vs_CPU.java | 154 +++++++++--------- .../Guessing_Game_Human_vs_CPU.class | Bin .../Guessing_Game_Human_vs_CPU.ctxt | 12 +- HeapSort/pom.xml | 15 ++ .../src/main/java}/HeapSort.java | 0 Interface/pom.xml | 15 ++ Interface/{ => src/main/java}/Driver.java | 46 +++--- Interface/{ => src/main/java}/Instrument.java | 12 +- Interface/{ => src/main/java}/Percussion.java | 26 ++- Interface/{ => src/main/java}/Stringed.java | 26 ++- Interface/{ => src/main/java}/Wind.java | 26 ++- LCM/pom.xml | 15 ++ .../src/main/java}/LCM.java | 3 +- LinkedList/pom.xml | 15 ++ .../LinkedListOperations.java | 2 +- LongestPalindromicSubString/pom.xml | 15 ++ .../java}/LongestPalindromicSubString.java | 0 MiniTennis/pom.xml | 15 ++ .../src/{ => main/java}/entities/Ball.java | 0 .../src/{ => main/java}/entities/Entity.java | 0 .../src/{ => main/java}/entities/Raquet.java | 0 .../src/{ => main/java}/game/Display.java | 0 MiniTennis/src/{ => main/java}/game/Game.java | 0 .../src/{ => main/java}/game/KeyManager.java | 0 .../src/{ => main/java}/game/Launch.java | 0 MiniTennis/{ => src/main/resources}/README.md | 0 NumberSquare/pom.xml | 15 ++ .../{ => src/main/java}/NumberSquare.java | 1 - RMI/pom.xml | 15 ++ RMI/{ => src/main/java}/Client.java | 0 RMI/{ => src/main/java}/HelloImpl.java | 0 RMI/{ => src/main/java}/HelloInt.java | 0 RMI/{ => src/main/java}/Server.java | 0 RandomInterviewQuestions/pom.xml | 15 ++ .../src/main/java}/TopKFrequent.java | 1 - .../src/main/resources}/ReadMe.md | 0 SegmentTrees/pom.xml | 15 ++ .../{ => src/main/java}/SegmentTrees.java | 0 SelectionSort/pom.xml | 15 ++ SelectionSort/{ => src/main/java}/Main.java | 0 Steganography/pom.xml | 15 ++ .../{ => src/main/java}/LSB_decode.java | 0 .../{ => src/main/java}/LSB_encode.java | 0 .../{ => src/main/resources}/README.md | 0 codeQuotient2/bin/.gitignore | 1 - pom.xml | 24 ++- 78 files changed, 441 insertions(+), 205 deletions(-) create mode 100644 BinaryTrees/pom.xml rename BinaryTrees/{ => src/main/java}/MirrorTree.java (100%) create mode 100644 BubbleSort/pom.xml rename BubbleSort/{ => src/main/java}/BubbleSort.java (100%) create mode 100644 CodeQuotient2/pom.xml rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/Student.java (96%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/TimeSpan.java (98%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/add1toeachDigit.java (95%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/aggMarks.java (94%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/classRectangle.java (91%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/cmpareReverse.java (95%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/evenodd.java (91%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/factorial.java (92%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/hra.java (92%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/kaperker.java (96%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/leapYear.java (93%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/matrixMultiplication.java (97%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/max.java (92%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/maxElement.java (95%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/multiplication.java (93%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/primenum.java (96%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/sumArray.java (97%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/sumofn.java (92%) rename {codeQuotient2/src/codeQuotient => CodeQuotient2/src/main/java}/swap.java (96%) create mode 100644 EuclieanDistance/pom.xml rename EuclieanDistance/{ => src/main/java}/EuclieanDistance.java (100%) create mode 100644 GuessTheMovieGame/pom.xml rename {Guess the Movie Game/src => GuessTheMovieGame/src/main/java}/Game.java (100%) rename {Guess the Movie Game/src => GuessTheMovieGame/src/main/java}/GuessTheMovie.java (100%) rename {Guess the Movie Game/src => GuessTheMovieGame/src/main/java}/Movie.java (90%) rename {Guess the Movie Game => GuessTheMovieGame/src/main/resources}/movies.txt (100%) create mode 100644 GuessingNumberGame/pom.xml rename {Guessing Number Game in Java => GuessingNumberGame/src/main/java}/Guessing_Game_Human_vs_CPU.java (97%) rename {Guessing Number Game in Java => GuessingNumberGame/src/main/resources}/Guessing_Game_Human_vs_CPU.class (100%) rename {Guessing Number Game in Java => GuessingNumberGame/src/main/resources}/Guessing_Game_Human_vs_CPU.ctxt (97%) create mode 100644 HeapSort/pom.xml rename {Heap_sort => HeapSort/src/main/java}/HeapSort.java (100%) create mode 100644 Interface/pom.xml rename Interface/{ => src/main/java}/Driver.java (90%) rename Interface/{ => src/main/java}/Instrument.java (74%) rename Interface/{ => src/main/java}/Percussion.java (87%) rename Interface/{ => src/main/java}/Stringed.java (87%) rename Interface/{ => src/main/java}/Wind.java (87%) create mode 100644 LCM/pom.xml rename {LCM of two numbers => LCM/src/main/java}/LCM.java (96%) create mode 100644 LinkedList/pom.xml rename {LinkedLists => LinkedList/src/main/java}/SinglyLinkedLists/LinkedListOperations.java (99%) create mode 100644 LongestPalindromicSubString/pom.xml rename LongestPalindromicSubString/{ => src/main/java}/LongestPalindromicSubString.java (100%) create mode 100644 MiniTennis/pom.xml rename MiniTennis/src/{ => main/java}/entities/Ball.java (100%) rename MiniTennis/src/{ => main/java}/entities/Entity.java (100%) rename MiniTennis/src/{ => main/java}/entities/Raquet.java (100%) rename MiniTennis/src/{ => main/java}/game/Display.java (100%) rename MiniTennis/src/{ => main/java}/game/Game.java (100%) rename MiniTennis/src/{ => main/java}/game/KeyManager.java (100%) rename MiniTennis/src/{ => main/java}/game/Launch.java (100%) rename MiniTennis/{ => src/main/resources}/README.md (100%) create mode 100644 NumberSquare/pom.xml rename NumberSquare/{ => src/main/java}/NumberSquare.java (97%) create mode 100644 RMI/pom.xml rename RMI/{ => src/main/java}/Client.java (100%) rename RMI/{ => src/main/java}/HelloImpl.java (100%) rename RMI/{ => src/main/java}/HelloInt.java (100%) rename RMI/{ => src/main/java}/Server.java (100%) create mode 100644 RandomInterviewQuestions/pom.xml rename {Random interview questions/Top K frequent => RandomInterviewQuestions/src/main/java}/TopKFrequent.java (95%) rename {Random interview questions/Top K frequent => RandomInterviewQuestions/src/main/resources}/ReadMe.md (100%) create mode 100644 SegmentTrees/pom.xml rename SegmentTrees/{ => src/main/java}/SegmentTrees.java (100%) create mode 100644 SelectionSort/pom.xml rename SelectionSort/{ => src/main/java}/Main.java (100%) create mode 100644 Steganography/pom.xml rename Steganography/{ => src/main/java}/LSB_decode.java (100%) rename Steganography/{ => src/main/java}/LSB_encode.java (100%) rename Steganography/{ => src/main/resources}/README.md (100%) delete mode 100644 codeQuotient2/bin/.gitignore diff --git a/BinaryTrees/pom.xml b/BinaryTrees/pom.xml new file mode 100644 index 0000000..d1a9d30 --- /dev/null +++ b/BinaryTrees/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + BinaryTree + + + \ No newline at end of file diff --git a/BinaryTrees/MirrorTree.java b/BinaryTrees/src/main/java/MirrorTree.java similarity index 100% rename from BinaryTrees/MirrorTree.java rename to BinaryTrees/src/main/java/MirrorTree.java diff --git a/BubbleSort/pom.xml b/BubbleSort/pom.xml new file mode 100644 index 0000000..221989b --- /dev/null +++ b/BubbleSort/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + BubbleSort + + + \ No newline at end of file diff --git a/BubbleSort/BubbleSort.java b/BubbleSort/src/main/java/BubbleSort.java similarity index 100% rename from BubbleSort/BubbleSort.java rename to BubbleSort/src/main/java/BubbleSort.java diff --git a/CodeQuotient2/pom.xml b/CodeQuotient2/pom.xml new file mode 100644 index 0000000..bd271fc --- /dev/null +++ b/CodeQuotient2/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + CodeQuotient2 + + + \ No newline at end of file diff --git a/codeQuotient2/src/codeQuotient/Student.java b/CodeQuotient2/src/main/java/Student.java similarity index 96% rename from codeQuotient2/src/codeQuotient/Student.java rename to CodeQuotient2/src/main/java/Student.java index 8a0abe6..638dd63 100644 --- a/codeQuotient2/src/codeQuotient/Student.java +++ b/CodeQuotient2/src/main/java/Student.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; import java.util.Scanner; diff --git a/codeQuotient2/src/codeQuotient/TimeSpan.java b/CodeQuotient2/src/main/java/TimeSpan.java similarity index 98% rename from codeQuotient2/src/codeQuotient/TimeSpan.java rename to CodeQuotient2/src/main/java/TimeSpan.java index d696466..f561277 100644 --- a/codeQuotient2/src/codeQuotient/TimeSpan.java +++ b/CodeQuotient2/src/main/java/TimeSpan.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; class TimeSpan diff --git a/codeQuotient2/src/codeQuotient/add1toeachDigit.java b/CodeQuotient2/src/main/java/add1toeachDigit.java similarity index 95% rename from codeQuotient2/src/codeQuotient/add1toeachDigit.java rename to CodeQuotient2/src/main/java/add1toeachDigit.java index 85c79fb..a2b4e38 100644 --- a/codeQuotient2/src/codeQuotient/add1toeachDigit.java +++ b/CodeQuotient2/src/main/java/add1toeachDigit.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; import java.lang.Math; class add1toeachDigit diff --git a/codeQuotient2/src/codeQuotient/aggMarks.java b/CodeQuotient2/src/main/java/aggMarks.java similarity index 94% rename from codeQuotient2/src/codeQuotient/aggMarks.java rename to CodeQuotient2/src/main/java/aggMarks.java index 9a30be8..01f6b73 100644 --- a/codeQuotient2/src/codeQuotient/aggMarks.java +++ b/CodeQuotient2/src/main/java/aggMarks.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class aggMarks { diff --git a/codeQuotient2/src/codeQuotient/classRectangle.java b/CodeQuotient2/src/main/java/classRectangle.java similarity index 91% rename from codeQuotient2/src/codeQuotient/classRectangle.java rename to CodeQuotient2/src/main/java/classRectangle.java index fb08a21..21bad32 100644 --- a/codeQuotient2/src/codeQuotient/classRectangle.java +++ b/CodeQuotient2/src/main/java/classRectangle.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.ArrayList; class classRectangle diff --git a/codeQuotient2/src/codeQuotient/cmpareReverse.java b/CodeQuotient2/src/main/java/cmpareReverse.java similarity index 95% rename from codeQuotient2/src/codeQuotient/cmpareReverse.java rename to CodeQuotient2/src/main/java/cmpareReverse.java index 21d168a..bf8cf2d 100644 --- a/codeQuotient2/src/codeQuotient/cmpareReverse.java +++ b/CodeQuotient2/src/main/java/cmpareReverse.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class cmpareReverse { diff --git a/codeQuotient2/src/codeQuotient/evenodd.java b/CodeQuotient2/src/main/java/evenodd.java similarity index 91% rename from codeQuotient2/src/codeQuotient/evenodd.java rename to CodeQuotient2/src/main/java/evenodd.java index c76346d..41b03bd 100644 --- a/codeQuotient2/src/codeQuotient/evenodd.java +++ b/CodeQuotient2/src/main/java/evenodd.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class evenodd { diff --git a/codeQuotient2/src/codeQuotient/factorial.java b/CodeQuotient2/src/main/java/factorial.java similarity index 92% rename from codeQuotient2/src/codeQuotient/factorial.java rename to CodeQuotient2/src/main/java/factorial.java index 7ce32a5..e8a9815 100644 --- a/codeQuotient2/src/codeQuotient/factorial.java +++ b/CodeQuotient2/src/main/java/factorial.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class factorial { diff --git a/codeQuotient2/src/codeQuotient/hra.java b/CodeQuotient2/src/main/java/hra.java similarity index 92% rename from codeQuotient2/src/codeQuotient/hra.java rename to CodeQuotient2/src/main/java/hra.java index 2c1ea6e..4ffef07 100644 --- a/codeQuotient2/src/codeQuotient/hra.java +++ b/CodeQuotient2/src/main/java/hra.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class hra { diff --git a/codeQuotient2/src/codeQuotient/kaperker.java b/CodeQuotient2/src/main/java/kaperker.java similarity index 96% rename from codeQuotient2/src/codeQuotient/kaperker.java rename to CodeQuotient2/src/main/java/kaperker.java index 55d4b63..72b024a 100644 --- a/codeQuotient2/src/codeQuotient/kaperker.java +++ b/CodeQuotient2/src/main/java/kaperker.java @@ -1,6 +1,3 @@ -package codeQuotient; - - import java.util.Scanner; //Other imports go here// Do NOT change the class name class kaperker diff --git a/codeQuotient2/src/codeQuotient/leapYear.java b/CodeQuotient2/src/main/java/leapYear.java similarity index 93% rename from codeQuotient2/src/codeQuotient/leapYear.java rename to CodeQuotient2/src/main/java/leapYear.java index e80c53b..aaea251 100644 --- a/codeQuotient2/src/codeQuotient/leapYear.java +++ b/CodeQuotient2/src/main/java/leapYear.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class leapYear { diff --git a/codeQuotient2/src/codeQuotient/matrixMultiplication.java b/CodeQuotient2/src/main/java/matrixMultiplication.java similarity index 97% rename from codeQuotient2/src/codeQuotient/matrixMultiplication.java rename to CodeQuotient2/src/main/java/matrixMultiplication.java index 1cf75e1..f1cbdcc 100644 --- a/codeQuotient2/src/codeQuotient/matrixMultiplication.java +++ b/CodeQuotient2/src/main/java/matrixMultiplication.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class matrixMultiplication { diff --git a/codeQuotient2/src/codeQuotient/max.java b/CodeQuotient2/src/main/java/max.java similarity index 92% rename from codeQuotient2/src/codeQuotient/max.java rename to CodeQuotient2/src/main/java/max.java index 53ce660..15cb2e0 100644 --- a/codeQuotient2/src/codeQuotient/max.java +++ b/CodeQuotient2/src/main/java/max.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class max{ diff --git a/codeQuotient2/src/codeQuotient/maxElement.java b/CodeQuotient2/src/main/java/maxElement.java similarity index 95% rename from codeQuotient2/src/codeQuotient/maxElement.java rename to CodeQuotient2/src/main/java/maxElement.java index 11b91cf..e29a053 100644 --- a/codeQuotient2/src/codeQuotient/maxElement.java +++ b/CodeQuotient2/src/main/java/maxElement.java @@ -1,6 +1,3 @@ -package codeQuotient; - - import java.util.Scanner; public class maxElement { diff --git a/codeQuotient2/src/codeQuotient/multiplication.java b/CodeQuotient2/src/main/java/multiplication.java similarity index 93% rename from codeQuotient2/src/codeQuotient/multiplication.java rename to CodeQuotient2/src/main/java/multiplication.java index 1ade2e7..6d71d38 100644 --- a/codeQuotient2/src/codeQuotient/multiplication.java +++ b/CodeQuotient2/src/main/java/multiplication.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class multiplication { diff --git a/codeQuotient2/src/codeQuotient/primenum.java b/CodeQuotient2/src/main/java/primenum.java similarity index 96% rename from codeQuotient2/src/codeQuotient/primenum.java rename to CodeQuotient2/src/main/java/primenum.java index 42178a8..7fddc33 100644 --- a/codeQuotient2/src/codeQuotient/primenum.java +++ b/CodeQuotient2/src/main/java/primenum.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class primenum { diff --git a/codeQuotient2/src/codeQuotient/sumArray.java b/CodeQuotient2/src/main/java/sumArray.java similarity index 97% rename from codeQuotient2/src/codeQuotient/sumArray.java rename to CodeQuotient2/src/main/java/sumArray.java index 0beeb51..a8b3e8f 100644 --- a/codeQuotient2/src/codeQuotient/sumArray.java +++ b/CodeQuotient2/src/main/java/sumArray.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class sumArray diff --git a/codeQuotient2/src/codeQuotient/sumofn.java b/CodeQuotient2/src/main/java/sumofn.java similarity index 92% rename from codeQuotient2/src/codeQuotient/sumofn.java rename to CodeQuotient2/src/main/java/sumofn.java index 3dacdf5..8bb228d 100644 --- a/codeQuotient2/src/codeQuotient/sumofn.java +++ b/CodeQuotient2/src/main/java/sumofn.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Scanner; public class sumofn { diff --git a/codeQuotient2/src/codeQuotient/swap.java b/CodeQuotient2/src/main/java/swap.java similarity index 96% rename from codeQuotient2/src/codeQuotient/swap.java rename to CodeQuotient2/src/main/java/swap.java index 1915847..52984a2 100644 --- a/codeQuotient2/src/codeQuotient/swap.java +++ b/CodeQuotient2/src/main/java/swap.java @@ -1,5 +1,3 @@ -package codeQuotient; - import java.util.Arrays; import java.util.Scanner; diff --git a/EuclieanDistance/pom.xml b/EuclieanDistance/pom.xml new file mode 100644 index 0000000..2078685 --- /dev/null +++ b/EuclieanDistance/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + EuclieanDistance + + + \ No newline at end of file diff --git a/EuclieanDistance/EuclieanDistance.java b/EuclieanDistance/src/main/java/EuclieanDistance.java similarity index 100% rename from EuclieanDistance/EuclieanDistance.java rename to EuclieanDistance/src/main/java/EuclieanDistance.java diff --git a/GuessTheMovieGame/pom.xml b/GuessTheMovieGame/pom.xml new file mode 100644 index 0000000..2da9731 --- /dev/null +++ b/GuessTheMovieGame/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + GuessTheMovieGame + + + \ No newline at end of file diff --git a/Guess the Movie Game/src/Game.java b/GuessTheMovieGame/src/main/java/Game.java similarity index 100% rename from Guess the Movie Game/src/Game.java rename to GuessTheMovieGame/src/main/java/Game.java diff --git a/Guess the Movie Game/src/GuessTheMovie.java b/GuessTheMovieGame/src/main/java/GuessTheMovie.java similarity index 100% rename from Guess the Movie Game/src/GuessTheMovie.java rename to GuessTheMovieGame/src/main/java/GuessTheMovie.java diff --git a/Guess the Movie Game/src/Movie.java b/GuessTheMovieGame/src/main/java/Movie.java similarity index 90% rename from Guess the Movie Game/src/Movie.java rename to GuessTheMovieGame/src/main/java/Movie.java index 0cb89ce..e5b1319 100644 --- a/Guess the Movie Game/src/Movie.java +++ b/GuessTheMovieGame/src/main/java/Movie.java @@ -5,7 +5,7 @@ public class Movie { public int length; public Movie(){ - File movieList = new File("movies.txt"); + File movieList = new File("src/main/movies.txt"); try { Scanner s = new Scanner(movieList); int totalMovies = 0; diff --git a/Guess the Movie Game/movies.txt b/GuessTheMovieGame/src/main/resources/movies.txt similarity index 100% rename from Guess the Movie Game/movies.txt rename to GuessTheMovieGame/src/main/resources/movies.txt diff --git a/GuessingNumberGame/pom.xml b/GuessingNumberGame/pom.xml new file mode 100644 index 0000000..121bee7 --- /dev/null +++ b/GuessingNumberGame/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + GuessingNumberGame + + + \ No newline at end of file diff --git a/Guessing Number Game in Java/Guessing_Game_Human_vs_CPU.java b/GuessingNumberGame/src/main/java/Guessing_Game_Human_vs_CPU.java similarity index 97% rename from Guessing Number Game in Java/Guessing_Game_Human_vs_CPU.java rename to GuessingNumberGame/src/main/java/Guessing_Game_Human_vs_CPU.java index f090ce0..cd91284 100644 --- a/Guessing Number Game in Java/Guessing_Game_Human_vs_CPU.java +++ b/GuessingNumberGame/src/main/java/Guessing_Game_Human_vs_CPU.java @@ -1,77 +1,77 @@ -import java.util.*; -import java.util.*; -public class Guessing_Game_Human_vs_CPU -{ - public static int computerGuess(int lower,int upper,int randnum,int count) - { - int guess=(lower+upper)/2; - if(guess==randnum) - return count; - - if(guessrandnum){ - count++; - return computerGuess(lower,guess,randnum,count); - } - return -1; - } - - public static void main(String[] args) - { - final Scanner sc=new Scanner(System.in); - char ch='Y'; - //the game resets if select Y else exits - while(ch=='Y') - { - //Generating a random integer number Between 1 to 100 - int randnum=(int)(Math.random()*100+1); - //Math.random gives adouble between 0 and 1 so multiply by 100 so gives between 0 to 99 and 1 for 0 to 100 - - int chances=10; - while(chances>0) //while attempts are less than 10 - { - System.out.print("Guesss A Number between 1 to 100:"); - int guess=sc.nextInt(); - //input the guessed Number - - if(guess==randnum){ - System.out.println("Congrats you guessed the number !!\n"); - break; - } - else if(guess>randnum){ - System.out.println("Your guess is higher than the number.\n"); - } - else{ - System.out.println("Your guess is lower than the number.\n"); - } - - chances--; - } - - if(chances!=0){ - System.out.println("\nYou guessed the Number in "+(10-chances)+" attempts."); - System.out.println("You scored "+(chances*10)+" points."); - } - else{ - System.out.println("\nYou were not able to guess the number in 10 attempts.\n Better Luck next Time"); - System.out.println("You scored 0 points."); - } - int steps=computerGuess(0,100,randnum,0); - System.out.println("\nComputer solved it in "+steps+" attempts."); - - if((10-chances)randnum){ + count++; + return computerGuess(lower,guess,randnum,count); + } + return -1; + } + + public static void main(String[] args) + { + final Scanner sc=new Scanner(System.in); + char ch='Y'; + //the game resets if select Y else exits + while(ch=='Y') + { + //Generating a random integer number Between 1 to 100 + int randnum=(int)(Math.random()*100+1); + //Math.random gives adouble between 0 and 1 so multiply by 100 so gives between 0 to 99 and 1 for 0 to 100 + + int chances=10; + while(chances>0) //while attempts are less than 10 + { + System.out.print("Guesss A Number between 1 to 100:"); + int guess=sc.nextInt(); + //input the guessed Number + + if(guess==randnum){ + System.out.println("Congrats you guessed the number !!\n"); + break; + } + else if(guess>randnum){ + System.out.println("Your guess is higher than the number.\n"); + } + else{ + System.out.println("Your guess is lower than the number.\n"); + } + + chances--; + } + + if(chances!=0){ + System.out.println("\nYou guessed the Number in "+(10-chances)+" attempts."); + System.out.println("You scored "+(chances*10)+" points."); + } + else{ + System.out.println("\nYou were not able to guess the number in 10 attempts.\n Better Luck next Time"); + System.out.println("You scored 0 points."); + } + int steps=computerGuess(0,100,randnum,0); + System.out.println("\nComputer solved it in "+steps+" attempts."); + + if((10-chances) + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + HeapSort + + + \ No newline at end of file diff --git a/Heap_sort/HeapSort.java b/HeapSort/src/main/java/HeapSort.java similarity index 100% rename from Heap_sort/HeapSort.java rename to HeapSort/src/main/java/HeapSort.java diff --git a/Interface/pom.xml b/Interface/pom.xml new file mode 100644 index 0000000..b0091dd --- /dev/null +++ b/Interface/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + Interface + + + \ No newline at end of file diff --git a/Interface/Driver.java b/Interface/src/main/java/Driver.java similarity index 90% rename from Interface/Driver.java rename to Interface/src/main/java/Driver.java index 28ed22f..ffe6b5b 100644 --- a/Interface/Driver.java +++ b/Interface/src/main/java/Driver.java @@ -1,24 +1,22 @@ -package mypackage; - -public class Driver { - - public static void main(String[] args) { - // TODO Auto-generated method stub - Wind w = new Wind(); - Percussion p = new Percussion(); - Stringed s = new Stringed(); - w.play(); - String str = w.what(); - System.out.println(str); - w.adjust(); - p.play(); - str = p.what(); - System.out.println(str); - p.adjust(); - s.play(); - str = s.what(); - System.out.println(str); - s.adjust(); - } - -} +public class Driver { + + public static void main(String[] args) { + // TODO Auto-generated method stub + Wind w = new Wind(); + Percussion p = new Percussion(); + Stringed s = new Stringed(); + w.play(); + String str = w.what(); + System.out.println(str); + w.adjust(); + p.play(); + str = p.what(); + System.out.println(str); + p.adjust(); + s.play(); + str = s.what(); + System.out.println(str); + s.adjust(); + } + +} diff --git a/Interface/Instrument.java b/Interface/src/main/java/Instrument.java similarity index 74% rename from Interface/Instrument.java rename to Interface/src/main/java/Instrument.java index f6b4e5f..398626a 100644 --- a/Interface/Instrument.java +++ b/Interface/src/main/java/Instrument.java @@ -1,7 +1,5 @@ -package mypackage; - -public interface Instrument { - void play(); - String what(); - void adjust(); -} +public interface Instrument { + void play(); + String what(); + void adjust(); +} diff --git a/Interface/Percussion.java b/Interface/src/main/java/Percussion.java similarity index 87% rename from Interface/Percussion.java rename to Interface/src/main/java/Percussion.java index ae95939..0c287ab 100644 --- a/Interface/Percussion.java +++ b/Interface/src/main/java/Percussion.java @@ -1,14 +1,12 @@ -package mypackage; - -public class Percussion { - public void play() { - System.out.println("Playing Percussion"); - } - public String what() { - String s = "Cymbal, Bell, Drums, Tabla"; - return s; - } - public void adjust() { - System.out.println("Membranes"); - } -} +public class Percussion { + public void play() { + System.out.println("Playing Percussion"); + } + public String what() { + String s = "Cymbal, Bell, Drums, Tabla"; + return s; + } + public void adjust() { + System.out.println("Membranes"); + } +} diff --git a/Interface/Stringed.java b/Interface/src/main/java/Stringed.java similarity index 87% rename from Interface/Stringed.java rename to Interface/src/main/java/Stringed.java index 6825862..06e28fd 100644 --- a/Interface/Stringed.java +++ b/Interface/src/main/java/Stringed.java @@ -1,14 +1,12 @@ -package mypackage; - -public class Stringed { - public void play() { - System.out.println("Playing Strings"); - } - public String what() { - String s = "Violin, Cello, Double Bass, Viola"; - return s; - } - public void adjust() { - System.out.println("Tuning"); - } -} +public class Stringed { + public void play() { + System.out.println("Playing Strings"); + } + public String what() { + String s = "Violin, Cello, Double Bass, Viola"; + return s; + } + public void adjust() { + System.out.println("Tuning"); + } +} diff --git a/Interface/Wind.java b/Interface/src/main/java/Wind.java similarity index 87% rename from Interface/Wind.java rename to Interface/src/main/java/Wind.java index 907a18a..c3b5df6 100644 --- a/Interface/Wind.java +++ b/Interface/src/main/java/Wind.java @@ -1,14 +1,12 @@ -package mypackage; - -public class Wind { - public void play() { - System.out.println("Playing Woodwind"); - } - public String what() { - String s = "Clarinet, Flute, Oboe, English Horn"; - return s; - } - public void adjust() { - System.out.println("Adjusting Keys"); - } -} +public class Wind { + public void play() { + System.out.println("Playing Woodwind"); + } + public String what() { + String s = "Clarinet, Flute, Oboe, English Horn"; + return s; + } + public void adjust() { + System.out.println("Adjusting Keys"); + } +} diff --git a/LCM/pom.xml b/LCM/pom.xml new file mode 100644 index 0000000..c673688 --- /dev/null +++ b/LCM/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + LCM + + + \ No newline at end of file diff --git a/LCM of two numbers/LCM.java b/LCM/src/main/java/LCM.java similarity index 96% rename from LCM of two numbers/LCM.java rename to LCM/src/main/java/LCM.java index 8bbd37a..bc6e564 100644 --- a/LCM of two numbers/LCM.java +++ b/LCM/src/main/java/LCM.java @@ -1,4 +1,5 @@ -import java.util.Scanner.*; +import java.util.Scanner; + class LCM { public static void main(String arg[]) { long a, b, lcm; diff --git a/LinkedList/pom.xml b/LinkedList/pom.xml new file mode 100644 index 0000000..6d36468 --- /dev/null +++ b/LinkedList/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + LinkedList + + + \ No newline at end of file diff --git a/LinkedLists/SinglyLinkedLists/LinkedListOperations.java b/LinkedList/src/main/java/SinglyLinkedLists/LinkedListOperations.java similarity index 99% rename from LinkedLists/SinglyLinkedLists/LinkedListOperations.java rename to LinkedList/src/main/java/SinglyLinkedLists/LinkedListOperations.java index 3c2876a..3cad8e7 100644 --- a/LinkedLists/SinglyLinkedLists/LinkedListOperations.java +++ b/LinkedList/src/main/java/SinglyLinkedLists/LinkedListOperations.java @@ -1,4 +1,4 @@ -package testing; +package SinglyLinkedLists; public class SinglyLinkedList { class Node{ diff --git a/LongestPalindromicSubString/pom.xml b/LongestPalindromicSubString/pom.xml new file mode 100644 index 0000000..c8b00ed --- /dev/null +++ b/LongestPalindromicSubString/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + LongestPalindromicSubString + + + \ No newline at end of file diff --git a/LongestPalindromicSubString/LongestPalindromicSubString.java b/LongestPalindromicSubString/src/main/java/LongestPalindromicSubString.java similarity index 100% rename from LongestPalindromicSubString/LongestPalindromicSubString.java rename to LongestPalindromicSubString/src/main/java/LongestPalindromicSubString.java diff --git a/MiniTennis/pom.xml b/MiniTennis/pom.xml new file mode 100644 index 0000000..cbe1c9d --- /dev/null +++ b/MiniTennis/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + MiniTennis + + + \ No newline at end of file diff --git a/MiniTennis/src/entities/Ball.java b/MiniTennis/src/main/java/entities/Ball.java similarity index 100% rename from MiniTennis/src/entities/Ball.java rename to MiniTennis/src/main/java/entities/Ball.java diff --git a/MiniTennis/src/entities/Entity.java b/MiniTennis/src/main/java/entities/Entity.java similarity index 100% rename from MiniTennis/src/entities/Entity.java rename to MiniTennis/src/main/java/entities/Entity.java diff --git a/MiniTennis/src/entities/Raquet.java b/MiniTennis/src/main/java/entities/Raquet.java similarity index 100% rename from MiniTennis/src/entities/Raquet.java rename to MiniTennis/src/main/java/entities/Raquet.java diff --git a/MiniTennis/src/game/Display.java b/MiniTennis/src/main/java/game/Display.java similarity index 100% rename from MiniTennis/src/game/Display.java rename to MiniTennis/src/main/java/game/Display.java diff --git a/MiniTennis/src/game/Game.java b/MiniTennis/src/main/java/game/Game.java similarity index 100% rename from MiniTennis/src/game/Game.java rename to MiniTennis/src/main/java/game/Game.java diff --git a/MiniTennis/src/game/KeyManager.java b/MiniTennis/src/main/java/game/KeyManager.java similarity index 100% rename from MiniTennis/src/game/KeyManager.java rename to MiniTennis/src/main/java/game/KeyManager.java diff --git a/MiniTennis/src/game/Launch.java b/MiniTennis/src/main/java/game/Launch.java similarity index 100% rename from MiniTennis/src/game/Launch.java rename to MiniTennis/src/main/java/game/Launch.java diff --git a/MiniTennis/README.md b/MiniTennis/src/main/resources/README.md similarity index 100% rename from MiniTennis/README.md rename to MiniTennis/src/main/resources/README.md diff --git a/NumberSquare/pom.xml b/NumberSquare/pom.xml new file mode 100644 index 0000000..7ff0ded --- /dev/null +++ b/NumberSquare/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + NumberSquare + + + \ No newline at end of file diff --git a/NumberSquare/NumberSquare.java b/NumberSquare/src/main/java/NumberSquare.java similarity index 97% rename from NumberSquare/NumberSquare.java rename to NumberSquare/src/main/java/NumberSquare.java index 0282355..9827fe0 100644 --- a/NumberSquare/NumberSquare.java +++ b/NumberSquare/src/main/java/NumberSquare.java @@ -3,7 +3,6 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ -package numbersquare; import java.util.Scanner; diff --git a/RMI/pom.xml b/RMI/pom.xml new file mode 100644 index 0000000..b397351 --- /dev/null +++ b/RMI/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + RMI + + + \ No newline at end of file diff --git a/RMI/Client.java b/RMI/src/main/java/Client.java similarity index 100% rename from RMI/Client.java rename to RMI/src/main/java/Client.java diff --git a/RMI/HelloImpl.java b/RMI/src/main/java/HelloImpl.java similarity index 100% rename from RMI/HelloImpl.java rename to RMI/src/main/java/HelloImpl.java diff --git a/RMI/HelloInt.java b/RMI/src/main/java/HelloInt.java similarity index 100% rename from RMI/HelloInt.java rename to RMI/src/main/java/HelloInt.java diff --git a/RMI/Server.java b/RMI/src/main/java/Server.java similarity index 100% rename from RMI/Server.java rename to RMI/src/main/java/Server.java diff --git a/RandomInterviewQuestions/pom.xml b/RandomInterviewQuestions/pom.xml new file mode 100644 index 0000000..04e4de7 --- /dev/null +++ b/RandomInterviewQuestions/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + RandomInterviewQuestions + + + \ No newline at end of file diff --git a/Random interview questions/Top K frequent/TopKFrequent.java b/RandomInterviewQuestions/src/main/java/TopKFrequent.java similarity index 95% rename from Random interview questions/Top K frequent/TopKFrequent.java rename to RandomInterviewQuestions/src/main/java/TopKFrequent.java index e3547d5..ae78157 100644 --- a/Random interview questions/Top K frequent/TopKFrequent.java +++ b/RandomInterviewQuestions/src/main/java/TopKFrequent.java @@ -1,4 +1,3 @@ -package Random interview questions.Top K frequent; import java.util.*; public class TopKFrequentElements { diff --git a/Random interview questions/Top K frequent/ReadMe.md b/RandomInterviewQuestions/src/main/resources/ReadMe.md similarity index 100% rename from Random interview questions/Top K frequent/ReadMe.md rename to RandomInterviewQuestions/src/main/resources/ReadMe.md diff --git a/SegmentTrees/pom.xml b/SegmentTrees/pom.xml new file mode 100644 index 0000000..4bf5f15 --- /dev/null +++ b/SegmentTrees/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + SegmentTrees + + + \ No newline at end of file diff --git a/SegmentTrees/SegmentTrees.java b/SegmentTrees/src/main/java/SegmentTrees.java similarity index 100% rename from SegmentTrees/SegmentTrees.java rename to SegmentTrees/src/main/java/SegmentTrees.java diff --git a/SelectionSort/pom.xml b/SelectionSort/pom.xml new file mode 100644 index 0000000..e52aca9 --- /dev/null +++ b/SelectionSort/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + SelectionSort + + + \ No newline at end of file diff --git a/SelectionSort/Main.java b/SelectionSort/src/main/java/Main.java similarity index 100% rename from SelectionSort/Main.java rename to SelectionSort/src/main/java/Main.java diff --git a/Steganography/pom.xml b/Steganography/pom.xml new file mode 100644 index 0000000..a296d2c --- /dev/null +++ b/Steganography/pom.xml @@ -0,0 +1,15 @@ + + + + LetUsJava + com.let.us.java + 1.0-SNAPSHOT + + 4.0.0 + + Steganography + + + \ No newline at end of file diff --git a/Steganography/LSB_decode.java b/Steganography/src/main/java/LSB_decode.java similarity index 100% rename from Steganography/LSB_decode.java rename to Steganography/src/main/java/LSB_decode.java diff --git a/Steganography/LSB_encode.java b/Steganography/src/main/java/LSB_encode.java similarity index 100% rename from Steganography/LSB_encode.java rename to Steganography/src/main/java/LSB_encode.java diff --git a/Steganography/README.md b/Steganography/src/main/resources/README.md similarity index 100% rename from Steganography/README.md rename to Steganography/src/main/resources/README.md diff --git a/codeQuotient2/bin/.gitignore b/codeQuotient2/bin/.gitignore deleted file mode 100644 index 7e5bb91..0000000 --- a/codeQuotient2/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/codeQuotient/ diff --git a/pom.xml b/pom.xml index c90ecf8..f1d0d42 100644 --- a/pom.xml +++ b/pom.xml @@ -23,29 +23,47 @@ AddFibonacciNumbers Admission ArmstrongNumber + BinarySearch + BinaryTrees + BubbleSort CalculatePi CodechefQuestions + CodeQuotient2 DynamicProgramming + EuclieanDistance FindMinimumInRotatedSortedArray FindPrime + GuessingNumberGame + GuessTheMovieGame + HeapSort + Interface KickStart2019 + LCM LeetCodeSolutions + LinkedList + LongestPalindromicSubString MatrixOperations + MiniTennis + NoMatcher + NumberSquare OTPGenerator PalindromeChecking Pangram PassGenerator PasswordValidationInJava PermutationOfString + RandomInterviewQuestions + RMI + SegmentTrees + SelectionSort SimpleDESEncryptionAlgorithm SnakeGameApplet SortingAlgorithms + Stacks + Steganography TowersOfHanoi Tree - NoMatcher Zomcav - Stacks - BinarySearch