From ba5c104b1dbfba66822da45030bae0dbcd66484b Mon Sep 17 00:00:00 2001 From: Bryzz Date: Sun, 27 Oct 2019 01:24:57 +0100 Subject: [PATCH 01/12] Hello world --- resources/HelloWorld.iml | 11 +++++++++++ resources/src/com/bryzz/dsc/hello/HelloWorld.java | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 resources/HelloWorld.iml create mode 100644 resources/src/com/bryzz/dsc/hello/HelloWorld.java diff --git a/resources/HelloWorld.iml b/resources/HelloWorld.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/resources/HelloWorld.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/resources/src/com/bryzz/dsc/hello/HelloWorld.java b/resources/src/com/bryzz/dsc/hello/HelloWorld.java new file mode 100644 index 0000000..c1a6c69 --- /dev/null +++ b/resources/src/com/bryzz/dsc/hello/HelloWorld.java @@ -0,0 +1,8 @@ +package com.bryzz.dsc.hello; + +public class HelloWorld { + + public static void main(String arg[]) { + System.out.println("Hello World"); + } +} From 3ff17c6adcfbe4c5978658531aed16df0e238f01 Mon Sep 17 00:00:00 2001 From: Bryzz Date: Sun, 27 Oct 2019 02:20:45 +0100 Subject: [PATCH 02/12] Syntax error corrected and refactoring --- resources/{ => HelloWorld}/HelloWorld.iml | 3 ++- .../HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java | 8 ++++++++ resources/src/com/bryzz/dsc/hello/HelloWorld.java | 8 -------- 3 files changed, 10 insertions(+), 9 deletions(-) rename resources/{ => HelloWorld}/HelloWorld.iml (97%) create mode 100644 resources/HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java delete mode 100644 resources/src/com/bryzz/dsc/hello/HelloWorld.java diff --git a/resources/HelloWorld.iml b/resources/HelloWorld/HelloWorld.iml similarity index 97% rename from resources/HelloWorld.iml rename to resources/HelloWorld/HelloWorld.iml index c90834f..d5c0743 100644 --- a/resources/HelloWorld.iml +++ b/resources/HelloWorld/HelloWorld.iml @@ -8,4 +8,5 @@ - \ No newline at end of file + + diff --git a/resources/HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java b/resources/HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java new file mode 100644 index 0000000..651246c --- /dev/null +++ b/resources/HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java @@ -0,0 +1,8 @@ +package com.bryzz.dsc.hello; + +public class HelloWorld { + + public static void main(String[] args) { + System.out.println("Hello World!!!"); + } +} diff --git a/resources/src/com/bryzz/dsc/hello/HelloWorld.java b/resources/src/com/bryzz/dsc/hello/HelloWorld.java deleted file mode 100644 index c1a6c69..0000000 --- a/resources/src/com/bryzz/dsc/hello/HelloWorld.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.bryzz.dsc.hello; - -public class HelloWorld { - - public static void main(String arg[]) { - System.out.println("Hello World"); - } -} From b377d1736c791c9909d0e8317d168a92e561ebdc Mon Sep 17 00:00:00 2001 From: Bryzz Date: Sun, 27 Oct 2019 11:12:16 +0100 Subject: [PATCH 03/12] performs basic arithmetic operations. closes #3 --- resources/Arithmetic2/Arithmetic2.iml | 12 ++++++ .../bryzz/dsc/arithmetic2/Arithmetic2-15.java | 42 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 resources/Arithmetic2/Arithmetic2.iml create mode 100644 resources/Arithmetic2/src/com/bryzz/dsc/arithmetic2/Arithmetic2-15.java diff --git a/resources/Arithmetic2/Arithmetic2.iml b/resources/Arithmetic2/Arithmetic2.iml new file mode 100644 index 0000000..d5c0743 --- /dev/null +++ b/resources/Arithmetic2/Arithmetic2.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/resources/Arithmetic2/src/com/bryzz/dsc/arithmetic2/Arithmetic2-15.java b/resources/Arithmetic2/src/com/bryzz/dsc/arithmetic2/Arithmetic2-15.java new file mode 100644 index 0000000..67d73ee --- /dev/null +++ b/resources/Arithmetic2/src/com/bryzz/dsc/arithmetic2/Arithmetic2-15.java @@ -0,0 +1,42 @@ +package com.bryzz.dsc.arithmetic2; + +import java.util.Scanner; +import java.math.*; + +class Arithmetic2 { + + private static Scanner scanner = new Scanner(System.in); + public static void main(String[] args) { + System.out.println("Enter two numbers: "); + int x = scanner.nextInt(); + int y = scanner.nextInt(); + + int sum = x + y; + int dif = x - y; + if(dif<0) { + dif = y - x; + } + int pxt = x*y; + int div = x/y; + if(x == 0 ) { + div = 0; + } + if(y == 0 ) { + div = 0; + } + if(div < 1 ) { + div = y/x; + } + + System.out.printf("\n\nSum = %d\nDifference = %d\nProduct = %d\nQuotient = %d", sum, dif, pxt, div); + + + } +} + +/* +(Arithmetic) Write an application that asks the user to enter two integers, obtains them + from the user and prints their sum, product, difference and quotient (division). + + Note that you should request a PR to this repo an your code will be merge in a branch with your name. + Also, the name of your file should be arithmetic2-15.java*/ \ No newline at end of file From ad1e9d20b779fa1fdf01015bb378cd6fc571ded6 Mon Sep 17 00:00:00 2001 From: Bryzz Date: Sun, 27 Oct 2019 12:21:54 +0100 Subject: [PATCH 04/12] print 1 2 3 4. closes #2 --- resources/DisplayNumbers/DisplayNumbers.iml | 12 +++++++ .../src/com/bryzz/dsc/DisplayNumbers.java | 32 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 resources/DisplayNumbers/DisplayNumbers.iml create mode 100644 resources/DisplayNumbers/src/com/bryzz/dsc/DisplayNumbers.java diff --git a/resources/DisplayNumbers/DisplayNumbers.iml b/resources/DisplayNumbers/DisplayNumbers.iml new file mode 100644 index 0000000..d5c0743 --- /dev/null +++ b/resources/DisplayNumbers/DisplayNumbers.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/resources/DisplayNumbers/src/com/bryzz/dsc/DisplayNumbers.java b/resources/DisplayNumbers/src/com/bryzz/dsc/DisplayNumbers.java new file mode 100644 index 0000000..64d56eb --- /dev/null +++ b/resources/DisplayNumbers/src/com/bryzz/dsc/DisplayNumbers.java @@ -0,0 +1,32 @@ +package com.bryzz.dsc; + +public class DisplayNumbers { + + public static void main(String[] args) { + System.out.println("\n1 - 4 using one System.out.println()"); + onePrintln(); + + System.out.println("\n\n1 - 4 using four System.out.print()"); + fourPrintln(); + + System.out.println("\n\n1 - 4 using four System.out.printf()"); + printf(); + } + + public static void onePrintln() { + System.out.println("1 2 3 4"); + } + + public static void fourPrintln() { + int i = 1; + for(i=1; i<=4; i++) { + System.out.print(i + " "); + } + + } + + public static void printf() { + System.out.printf("%d %d %d %d",1, 2, 3, 4); + } +} + From a628886bed1afc17c3ab02a58478faed59f142db Mon Sep 17 00:00:00 2001 From: Bryzz Date: Wed, 30 Oct 2019 11:29:37 +0100 Subject: [PATCH 05/12] new directory Brice created. closes #2, closes #3, closes #4, closes #5 --- .../{ => Brice}/Arithmetic2/Arithmetic2.iml | 0 .../bryzz/dsc/arithmetic2/Arithmetic2-15.java | 0 .../Brice/CompareNumbers/.attach_pid18990 | 0 .../CompareNumbers/CompareNumbers.iml} | 0 .../META-INF/CompareNumbers.kotlin_module | Bin 0 -> 16 bytes .../bryzz/dsc/numbers/comparingNumbers.java | 23 ++++++ .../DisplayNumbers/DisplayNumbers.iml} | 0 .../src/com/bryzz/dsc/DisplayNumbers.java | 0 resources/Brice/HelloWorld/HelloWorld.iml | 12 ++++ .../src/com/bryzz/dsc/hello/HelloWorld.java | 0 resources/Brice/arithmetic3/arithmetic3.iml | 12 ++++ .../bryzz/dsc/arithmetic3/arithmetic3.java | 67 ++++++++++++++++++ 12 files changed, 114 insertions(+) rename resources/{ => Brice}/Arithmetic2/Arithmetic2.iml (100%) rename resources/{ => Brice}/Arithmetic2/src/com/bryzz/dsc/arithmetic2/Arithmetic2-15.java (100%) create mode 100644 resources/Brice/CompareNumbers/.attach_pid18990 rename resources/{DisplayNumbers/DisplayNumbers.iml => Brice/CompareNumbers/CompareNumbers.iml} (100%) create mode 100644 resources/Brice/CompareNumbers/out/production/CompareNumbers/META-INF/CompareNumbers.kotlin_module create mode 100644 resources/Brice/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java rename resources/{HelloWorld/HelloWorld.iml => Brice/DisplayNumbers/DisplayNumbers.iml} (100%) rename resources/{ => Brice}/DisplayNumbers/src/com/bryzz/dsc/DisplayNumbers.java (100%) create mode 100644 resources/Brice/HelloWorld/HelloWorld.iml rename resources/{ => Brice}/HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java (100%) create mode 100644 resources/Brice/arithmetic3/arithmetic3.iml create mode 100644 resources/Brice/arithmetic3/src/com/bryzz/dsc/arithmetic3/arithmetic3.java diff --git a/resources/Arithmetic2/Arithmetic2.iml b/resources/Brice/Arithmetic2/Arithmetic2.iml similarity index 100% rename from resources/Arithmetic2/Arithmetic2.iml rename to resources/Brice/Arithmetic2/Arithmetic2.iml diff --git a/resources/Arithmetic2/src/com/bryzz/dsc/arithmetic2/Arithmetic2-15.java b/resources/Brice/Arithmetic2/src/com/bryzz/dsc/arithmetic2/Arithmetic2-15.java similarity index 100% rename from resources/Arithmetic2/src/com/bryzz/dsc/arithmetic2/Arithmetic2-15.java rename to resources/Brice/Arithmetic2/src/com/bryzz/dsc/arithmetic2/Arithmetic2-15.java diff --git a/resources/Brice/CompareNumbers/.attach_pid18990 b/resources/Brice/CompareNumbers/.attach_pid18990 new file mode 100644 index 0000000..e69de29 diff --git a/resources/DisplayNumbers/DisplayNumbers.iml b/resources/Brice/CompareNumbers/CompareNumbers.iml similarity index 100% rename from resources/DisplayNumbers/DisplayNumbers.iml rename to resources/Brice/CompareNumbers/CompareNumbers.iml diff --git a/resources/Brice/CompareNumbers/out/production/CompareNumbers/META-INF/CompareNumbers.kotlin_module b/resources/Brice/CompareNumbers/out/production/CompareNumbers/META-INF/CompareNumbers.kotlin_module new file mode 100644 index 0000000000000000000000000000000000000000..2983af70661ad375cc499ebc4da5a68ca46c532e GIT binary patch literal 16 RcmZQzU|?ooU|@t|egFVe02KfL literal 0 HcmV?d00001 diff --git a/resources/Brice/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java b/resources/Brice/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java new file mode 100644 index 0000000..f7da2be --- /dev/null +++ b/resources/Brice/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java @@ -0,0 +1,23 @@ +package com.bryzz.dsc.numbers; + +import java.util.Scanner; + + +class Main { + + private static Scanner scanner = new Scanner(System.in); + public static void main(String[] args) { + + System.out.println("Enter two numbers:\n"); + double x = scanner.nextDouble(); + double y = scanner.nextDouble(); + if(x > y) { + System.out.println(x + " Larger"); + }else if(y > x) { + System.out.println(y + " Larger"); + }else { + System.out.println("These numbers are equal"); + } + + } +} diff --git a/resources/HelloWorld/HelloWorld.iml b/resources/Brice/DisplayNumbers/DisplayNumbers.iml similarity index 100% rename from resources/HelloWorld/HelloWorld.iml rename to resources/Brice/DisplayNumbers/DisplayNumbers.iml diff --git a/resources/DisplayNumbers/src/com/bryzz/dsc/DisplayNumbers.java b/resources/Brice/DisplayNumbers/src/com/bryzz/dsc/DisplayNumbers.java similarity index 100% rename from resources/DisplayNumbers/src/com/bryzz/dsc/DisplayNumbers.java rename to resources/Brice/DisplayNumbers/src/com/bryzz/dsc/DisplayNumbers.java diff --git a/resources/Brice/HelloWorld/HelloWorld.iml b/resources/Brice/HelloWorld/HelloWorld.iml new file mode 100644 index 0000000..d5c0743 --- /dev/null +++ b/resources/Brice/HelloWorld/HelloWorld.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/resources/HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java b/resources/Brice/HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java similarity index 100% rename from resources/HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java rename to resources/Brice/HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java diff --git a/resources/Brice/arithmetic3/arithmetic3.iml b/resources/Brice/arithmetic3/arithmetic3.iml new file mode 100644 index 0000000..d5c0743 --- /dev/null +++ b/resources/Brice/arithmetic3/arithmetic3.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/resources/Brice/arithmetic3/src/com/bryzz/dsc/arithmetic3/arithmetic3.java b/resources/Brice/arithmetic3/src/com/bryzz/dsc/arithmetic3/arithmetic3.java new file mode 100644 index 0000000..f264908 --- /dev/null +++ b/resources/Brice/arithmetic3/src/com/bryzz/dsc/arithmetic3/arithmetic3.java @@ -0,0 +1,67 @@ +package com.bryzz.dsc.arithmetic3; + + +import java.util.Scanner; +import java.math.*; + +class Main { + + private static Scanner scanner = new Scanner(System.in); + public static void main(String[] args) { + System.out.println("Enter 10 numbers: "); + int[] list = new int[10]; + int sum = 0; + int pxt = 1; + int average = 0; + int smallest = 0, largest = 0; + + + for(int i=0; i largest) { + largest = num; + } + + if(num < smallest) { + smallest = num; + } + + } + + + average = sum/list.length; + + + System.out.printf("\n\nSum = %d\nAverage = %d\nProduct = %d\nSmallest = %d\nLargest = %d", sum, average, pxt, smallest, largest); + + + } + + +} + +/* + +Write an application that inputs a given amount of integers from the user and +displays the sum, average, product, smallest and largest of the numbers. +[Note: The calculation of the average in this exercise should result in an integer representation of the average. +So, if the sum of the values of 3 integers is 7, the average should be 2, not 2.3333….]. + +The name of your program file should be arithmethic3.java + + +*/ From 0ad736c112ff8dd6077e4aeb1b2e79c4ca7d619b Mon Sep 17 00:00:00 2001 From: Wandji69 Date: Wed, 30 Oct 2019 11:16:49 +0100 Subject: [PATCH 06/12] Rearraning files and creating a branch for brice --- .gitignore | 1 + resources/Brice/Arithmetic2/Arithmetic2.iml | 12 --------- .../bryzz/dsc/Chapter_2}/Arithmetic2-15.java | 0 .../bryzz/dsc/Chapter_2}/DisplayNumbers.java | 0 .../com/bryzz/dsc/Chapter_2}/HelloWorld.java | 0 .../com/bryzz/dsc/Chapter_2}/arithmetic3.java | 0 .../dsc/Chapter_2}/comparingNumbers.java | 0 .../dsc}/CompareNumbers/.attach_pid18990 | 0 .../META-INF/CompareNumbers.kotlin_module | Bin .../bryzz/dsc/numbers/comparingNumbers.java | 23 ++++++++++++++++++ .../Brice/CompareNumbers/CompareNumbers.iml | 12 --------- .../Brice/DisplayNumbers/DisplayNumbers.iml | 12 --------- resources/Brice/HelloWorld/HelloWorld.iml | 12 --------- resources/Brice/arithmetic3/arithmetic3.iml | 12 --------- 14 files changed, 24 insertions(+), 60 deletions(-) delete mode 100644 resources/Brice/Arithmetic2/Arithmetic2.iml rename resources/Brice/{Arithmetic2/src/com/bryzz/dsc/arithmetic2 => Chapter_2/src/com/bryzz/dsc/Chapter_2}/Arithmetic2-15.java (100%) rename resources/Brice/{DisplayNumbers/src/com/bryzz/dsc => Chapter_2/src/com/bryzz/dsc/Chapter_2}/DisplayNumbers.java (100%) rename resources/Brice/{HelloWorld/src/com/bryzz/dsc/hello => Chapter_2/src/com/bryzz/dsc/Chapter_2}/HelloWorld.java (100%) rename resources/Brice/{arithmetic3/src/com/bryzz/dsc/arithmetic3 => Chapter_2/src/com/bryzz/dsc/Chapter_2}/arithmetic3.java (100%) rename resources/Brice/{CompareNumbers/src/com/bryzz/dsc/numbers => Chapter_2/src/com/bryzz/dsc/Chapter_2}/comparingNumbers.java (100%) rename resources/Brice/{ => Chapter_2/src/com/bryzz/dsc}/CompareNumbers/.attach_pid18990 (100%) rename resources/Brice/{ => Chapter_2/src/com/bryzz/dsc}/CompareNumbers/out/production/CompareNumbers/META-INF/CompareNumbers.kotlin_module (100%) create mode 100644 resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java delete mode 100644 resources/Brice/CompareNumbers/CompareNumbers.iml delete mode 100644 resources/Brice/DisplayNumbers/DisplayNumbers.iml delete mode 100644 resources/Brice/HelloWorld/HelloWorld.iml delete mode 100644 resources/Brice/arithmetic3/arithmetic3.iml diff --git a/.gitignore b/.gitignore index 63f1eca..3c39dab 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ hs_err_pid* # IDE files .idea +*.iml diff --git a/resources/Brice/Arithmetic2/Arithmetic2.iml b/resources/Brice/Arithmetic2/Arithmetic2.iml deleted file mode 100644 index d5c0743..0000000 --- a/resources/Brice/Arithmetic2/Arithmetic2.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/resources/Brice/Arithmetic2/src/com/bryzz/dsc/arithmetic2/Arithmetic2-15.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/Arithmetic2-15.java similarity index 100% rename from resources/Brice/Arithmetic2/src/com/bryzz/dsc/arithmetic2/Arithmetic2-15.java rename to resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/Arithmetic2-15.java diff --git a/resources/Brice/DisplayNumbers/src/com/bryzz/dsc/DisplayNumbers.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/DisplayNumbers.java similarity index 100% rename from resources/Brice/DisplayNumbers/src/com/bryzz/dsc/DisplayNumbers.java rename to resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/DisplayNumbers.java diff --git a/resources/Brice/HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/HelloWorld.java similarity index 100% rename from resources/Brice/HelloWorld/src/com/bryzz/dsc/hello/HelloWorld.java rename to resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/HelloWorld.java diff --git a/resources/Brice/arithmetic3/src/com/bryzz/dsc/arithmetic3/arithmetic3.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/arithmetic3.java similarity index 100% rename from resources/Brice/arithmetic3/src/com/bryzz/dsc/arithmetic3/arithmetic3.java rename to resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/arithmetic3.java diff --git a/resources/Brice/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/comparingNumbers.java similarity index 100% rename from resources/Brice/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java rename to resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/comparingNumbers.java diff --git a/resources/Brice/CompareNumbers/.attach_pid18990 b/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/.attach_pid18990 similarity index 100% rename from resources/Brice/CompareNumbers/.attach_pid18990 rename to resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/.attach_pid18990 diff --git a/resources/Brice/CompareNumbers/out/production/CompareNumbers/META-INF/CompareNumbers.kotlin_module b/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/out/production/CompareNumbers/META-INF/CompareNumbers.kotlin_module similarity index 100% rename from resources/Brice/CompareNumbers/out/production/CompareNumbers/META-INF/CompareNumbers.kotlin_module rename to resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/out/production/CompareNumbers/META-INF/CompareNumbers.kotlin_module diff --git a/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java new file mode 100644 index 0000000..f7da2be --- /dev/null +++ b/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java @@ -0,0 +1,23 @@ +package com.bryzz.dsc.numbers; + +import java.util.Scanner; + + +class Main { + + private static Scanner scanner = new Scanner(System.in); + public static void main(String[] args) { + + System.out.println("Enter two numbers:\n"); + double x = scanner.nextDouble(); + double y = scanner.nextDouble(); + if(x > y) { + System.out.println(x + " Larger"); + }else if(y > x) { + System.out.println(y + " Larger"); + }else { + System.out.println("These numbers are equal"); + } + + } +} diff --git a/resources/Brice/CompareNumbers/CompareNumbers.iml b/resources/Brice/CompareNumbers/CompareNumbers.iml deleted file mode 100644 index d5c0743..0000000 --- a/resources/Brice/CompareNumbers/CompareNumbers.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/resources/Brice/DisplayNumbers/DisplayNumbers.iml b/resources/Brice/DisplayNumbers/DisplayNumbers.iml deleted file mode 100644 index d5c0743..0000000 --- a/resources/Brice/DisplayNumbers/DisplayNumbers.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/resources/Brice/HelloWorld/HelloWorld.iml b/resources/Brice/HelloWorld/HelloWorld.iml deleted file mode 100644 index d5c0743..0000000 --- a/resources/Brice/HelloWorld/HelloWorld.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/resources/Brice/arithmetic3/arithmetic3.iml b/resources/Brice/arithmetic3/arithmetic3.iml deleted file mode 100644 index d5c0743..0000000 --- a/resources/Brice/arithmetic3/arithmetic3.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - From 6e012810cd4ed2f519e129156ecedff616126ffc Mon Sep 17 00:00:00 2001 From: Kamadje Allen <46921711+allenbangai@users.noreply.github.com> Date: Wed, 30 Oct 2019 22:11:43 +0100 Subject: [PATCH 07/12] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f6e3a3..d18f5a5 100644 --- a/README.md +++ b/README.md @@ -18,4 +18,6 @@ Students are expected to setup the following. * Move to your working directory, that is `cd yourDirectoryName/JavaLearningCode` * Creat a new branch with `git checkout -b YourBranchName` * On pushing your work make sure you push but the branch for example `git push YourBranchName` - * Once you have push, go online and create PR so that your work will be reviewed and merged. \ No newline at end of file + * Once you have push, come to us and we shall create in branch in your name where you shall be creating all your PR to. + * Go online and create PR to the branch with your name so that your work will be reviewed and merged. + * Thanks From 4ccad0ab3eb0ea852d1b00b31d30d47d03bdef9a Mon Sep 17 00:00:00 2001 From: =allenbangai <=allenkamadje@gmail.com> Date: Wed, 30 Oct 2019 22:24:19 +0100 Subject: [PATCH 08/12] Deleting brice folder from master branch --- .../bryzz/dsc/Chapter_2/Arithmetic2-15.java | 42 ----------- .../bryzz/dsc/Chapter_2/DisplayNumbers.java | 32 --------- .../com/bryzz/dsc/Chapter_2/HelloWorld.java | 8 --- .../com/bryzz/dsc/Chapter_2/arithmetic3.java | 67 ------------------ .../bryzz/dsc/Chapter_2/comparingNumbers.java | 23 ------ .../bryzz/dsc/CompareNumbers/.attach_pid18990 | 0 .../META-INF/CompareNumbers.kotlin_module | Bin 16 -> 0 bytes .../bryzz/dsc/numbers/comparingNumbers.java | 23 ------ 8 files changed, 195 deletions(-) delete mode 100644 resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/Arithmetic2-15.java delete mode 100644 resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/DisplayNumbers.java delete mode 100644 resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/HelloWorld.java delete mode 100644 resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/arithmetic3.java delete mode 100644 resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/comparingNumbers.java delete mode 100644 resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/.attach_pid18990 delete mode 100644 resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/out/production/CompareNumbers/META-INF/CompareNumbers.kotlin_module delete mode 100644 resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java diff --git a/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/Arithmetic2-15.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/Arithmetic2-15.java deleted file mode 100644 index 67d73ee..0000000 --- a/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/Arithmetic2-15.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.bryzz.dsc.arithmetic2; - -import java.util.Scanner; -import java.math.*; - -class Arithmetic2 { - - private static Scanner scanner = new Scanner(System.in); - public static void main(String[] args) { - System.out.println("Enter two numbers: "); - int x = scanner.nextInt(); - int y = scanner.nextInt(); - - int sum = x + y; - int dif = x - y; - if(dif<0) { - dif = y - x; - } - int pxt = x*y; - int div = x/y; - if(x == 0 ) { - div = 0; - } - if(y == 0 ) { - div = 0; - } - if(div < 1 ) { - div = y/x; - } - - System.out.printf("\n\nSum = %d\nDifference = %d\nProduct = %d\nQuotient = %d", sum, dif, pxt, div); - - - } -} - -/* -(Arithmetic) Write an application that asks the user to enter two integers, obtains them - from the user and prints their sum, product, difference and quotient (division). - - Note that you should request a PR to this repo an your code will be merge in a branch with your name. - Also, the name of your file should be arithmetic2-15.java*/ \ No newline at end of file diff --git a/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/DisplayNumbers.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/DisplayNumbers.java deleted file mode 100644 index 64d56eb..0000000 --- a/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/DisplayNumbers.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.bryzz.dsc; - -public class DisplayNumbers { - - public static void main(String[] args) { - System.out.println("\n1 - 4 using one System.out.println()"); - onePrintln(); - - System.out.println("\n\n1 - 4 using four System.out.print()"); - fourPrintln(); - - System.out.println("\n\n1 - 4 using four System.out.printf()"); - printf(); - } - - public static void onePrintln() { - System.out.println("1 2 3 4"); - } - - public static void fourPrintln() { - int i = 1; - for(i=1; i<=4; i++) { - System.out.print(i + " "); - } - - } - - public static void printf() { - System.out.printf("%d %d %d %d",1, 2, 3, 4); - } -} - diff --git a/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/HelloWorld.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/HelloWorld.java deleted file mode 100644 index 651246c..0000000 --- a/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/HelloWorld.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.bryzz.dsc.hello; - -public class HelloWorld { - - public static void main(String[] args) { - System.out.println("Hello World!!!"); - } -} diff --git a/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/arithmetic3.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/arithmetic3.java deleted file mode 100644 index f264908..0000000 --- a/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/arithmetic3.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.bryzz.dsc.arithmetic3; - - -import java.util.Scanner; -import java.math.*; - -class Main { - - private static Scanner scanner = new Scanner(System.in); - public static void main(String[] args) { - System.out.println("Enter 10 numbers: "); - int[] list = new int[10]; - int sum = 0; - int pxt = 1; - int average = 0; - int smallest = 0, largest = 0; - - - for(int i=0; i largest) { - largest = num; - } - - if(num < smallest) { - smallest = num; - } - - } - - - average = sum/list.length; - - - System.out.printf("\n\nSum = %d\nAverage = %d\nProduct = %d\nSmallest = %d\nLargest = %d", sum, average, pxt, smallest, largest); - - - } - - -} - -/* - -Write an application that inputs a given amount of integers from the user and -displays the sum, average, product, smallest and largest of the numbers. -[Note: The calculation of the average in this exercise should result in an integer representation of the average. -So, if the sum of the values of 3 integers is 7, the average should be 2, not 2.3333….]. - -The name of your program file should be arithmethic3.java - - -*/ diff --git a/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/comparingNumbers.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/comparingNumbers.java deleted file mode 100644 index f7da2be..0000000 --- a/resources/Brice/Chapter_2/src/com/bryzz/dsc/Chapter_2/comparingNumbers.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.bryzz.dsc.numbers; - -import java.util.Scanner; - - -class Main { - - private static Scanner scanner = new Scanner(System.in); - public static void main(String[] args) { - - System.out.println("Enter two numbers:\n"); - double x = scanner.nextDouble(); - double y = scanner.nextDouble(); - if(x > y) { - System.out.println(x + " Larger"); - }else if(y > x) { - System.out.println(y + " Larger"); - }else { - System.out.println("These numbers are equal"); - } - - } -} diff --git a/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/.attach_pid18990 b/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/.attach_pid18990 deleted file mode 100644 index e69de29..0000000 diff --git a/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/out/production/CompareNumbers/META-INF/CompareNumbers.kotlin_module b/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/out/production/CompareNumbers/META-INF/CompareNumbers.kotlin_module deleted file mode 100644 index 2983af70661ad375cc499ebc4da5a68ca46c532e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16 RcmZQzU|?ooU|@t|egFVe02KfL diff --git a/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java b/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java deleted file mode 100644 index f7da2be..0000000 --- a/resources/Brice/Chapter_2/src/com/bryzz/dsc/CompareNumbers/src/com/bryzz/dsc/numbers/comparingNumbers.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.bryzz.dsc.numbers; - -import java.util.Scanner; - - -class Main { - - private static Scanner scanner = new Scanner(System.in); - public static void main(String[] args) { - - System.out.println("Enter two numbers:\n"); - double x = scanner.nextDouble(); - double y = scanner.nextDouble(); - if(x > y) { - System.out.println(x + " Larger"); - }else if(y > x) { - System.out.println(y + " Larger"); - }else { - System.out.println("These numbers are equal"); - } - - } -} From 2a071655808073f8ee19b3bad5e2d7ed1a5f5c51 Mon Sep 17 00:00:00 2001 From: Kamadje Allen <46921711+allenbangai@users.noreply.github.com> Date: Wed, 30 Oct 2019 22:46:43 +0100 Subject: [PATCH 09/12] Update README.md --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d18f5a5..2b5e372 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,21 @@ Students are expected to setup the following. ## Steps to follow when working. - After cloning the repository, Creat a new directory and give it your `Name` For example: `CollinsJava` -- Creat a new branch with you name, follow this steps - * Open a new terminal windows +- Creat a new branch with you name, follow this steps. + * Open a new terminal windows. * Move to your working directory, that is `cd yourDirectoryName/JavaLearningCode` * Creat a new branch with `git checkout -b YourBranchName` * On pushing your work make sure you push but the branch for example `git push YourBranchName` * Once you have push, come to us and we shall create in branch in your name where you shall be creating all your PR to. * Go online and create PR to the branch with your name so that your work will be reviewed and merged. * Thanks + +## How to go through your work +- There are level of difficulties to go through and each person should solve atmost 8 and atleast 6 of each difficulty before going to the next level of difficulty. The levels are: + * Difficulty01 + * Difficulty02 + * Difficulty03 + * Difficulty04 + * Difficulty05 +- It should be advisable that each level of difficulty issues should be in a different folder. +- Going though all this will help you being suited to android development using the java language. From e95994cfae23d89dfebfb69741935caa3be8001b Mon Sep 17 00:00:00 2001 From: Kamadje Allen <46921711+allenbangai@users.noreply.github.com> Date: Thu, 31 Oct 2019 06:29:59 +0100 Subject: [PATCH 10/12] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2b5e372..86fb41e 100644 --- a/README.md +++ b/README.md @@ -30,4 +30,6 @@ Students are expected to setup the following. * Difficulty04 * Difficulty05 - It should be advisable that each level of difficulty issues should be in a different folder. +- Depending on your skills, you can start from any level of diffiulty and go though the issues. +- If you think you are skill enough, you can make your first PR to this android project https://github.com/DSC-UB/travel_mobile. - Going though all this will help you being suited to android development using the java language. From 09b739c08cbe80fd98f79e7dc203d784fcc9254c Mon Sep 17 00:00:00 2001 From: Kamadje Allen <46921711+allenbangai@users.noreply.github.com> Date: Thu, 31 Oct 2019 20:21:46 +0100 Subject: [PATCH 11/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86fb41e..6f7c620 100644 --- a/README.md +++ b/README.md @@ -31,5 +31,5 @@ Students are expected to setup the following. * Difficulty05 - It should be advisable that each level of difficulty issues should be in a different folder. - Depending on your skills, you can start from any level of diffiulty and go though the issues. -- If you think you are skill enough, you can make your first PR to this android project https://github.com/DSC-UB/travel_mobile. +- If you think you are skill enough not to go through our issues, you can make your first PR to this android project https://github.com/DSC-UB/travel_mobile. - Going though all this will help you being suited to android development using the java language. From 51b8a78744dc6f3a1f997f0a3a4ae7e9aee41d82 Mon Sep 17 00:00:00 2001 From: Kamadje Allen <46921711+allenbangai@users.noreply.github.com> Date: Sat, 23 Nov 2019 06:54:27 +0100 Subject: [PATCH 12/12] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f7c620..c1eb057 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,9 @@ Students are expected to setup the following. - Download and install jdk 11 or 12. Use this link https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html or this https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html . - Apply for github student pack here https://education.github.com/discount_requests/new . -- Come back to us in the WhatsApp group so we may help you make your first PR with a simple "hello world" program. +- Come back to us in the WhatsApp group so we may help you make your first PR with a simple "hello world" program + follow this video course to know how to walk though git and github. +. ## Steps to follow when working. - After cloning the repository, Creat a new directory and give it your `Name` For example: `CollinsJava`