From bdbcb9f9479fed0655b8b26ed846a70ea093da7e Mon Sep 17 00:00:00 2001 From: Rayman4009 Date: Fri, 6 Oct 2023 12:21:20 -0800 Subject: [PATCH 1/4] Updated --- .idea/misc.xml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 7464918..69ace3f 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/README.md b/README.md index ae51dc5..62e2421 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ In this README.md, answer the following question: * What happens if you invoke a value method (i.e. a method that returns a result) and don't do anything with the returned result; that is, if you don't assign the returned result to a variable or use it as part of a larger expression? - +* Answer: Nothing world happen, it would act like a void ## PART 2 * Fork and clone this lab as you have done in all previous labs, and then complete the following: * Create a new **class** called **Lab006** From 94daa3b2e79742fe6512682f9a4d27218f4dcdc8 Mon Sep 17 00:00:00 2001 From: Rayman4009 Date: Fri, 6 Oct 2023 12:21:44 -0800 Subject: [PATCH 2/4] Updated --- src/Lab006.java | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/Lab006.java diff --git a/src/Lab006.java b/src/Lab006.java new file mode 100644 index 0000000..ffa0507 --- /dev/null +++ b/src/Lab006.java @@ -0,0 +1,33 @@ +import java.util.Scanner; +public class Lab006 { + private int n; + private int m; +public Lab006(int n, int m) { + this.n = n; + this.m = m; +} + public boolean isDivisible() { + if (n % m == 0) { + return true; + + } else { + return false; + } + } + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + System.out.println("Give me one integer"); + String x = scanner.nextLine(); + System.out.println("Give me a second integer"); + String y = scanner.nextLine(); + + Lab006 L = new Lab006(x, y); + L.isDivisible(); + + public static int parseInt(String"x", String"y"); + int = Integer.parseInt(String "x"); + int = Integer.parseInt(y); + + } + +} \ No newline at end of file From 79107df4a9f0becafb1d4a1909b626a942db8d52 Mon Sep 17 00:00:00 2001 From: Rayman4009 Date: Fri, 6 Oct 2023 12:25:24 -0800 Subject: [PATCH 3/4] Updated 2 --- src/Lab006.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Lab006.java b/src/Lab006.java index ffa0507..73382c0 100644 --- a/src/Lab006.java +++ b/src/Lab006.java @@ -28,6 +28,8 @@ public static void main(String[] args) { int = Integer.parseInt(String "x"); int = Integer.parseInt(y); + + } } \ No newline at end of file From 700b12085f75cb9c4d77503b3d03f60b8c80b2ab Mon Sep 17 00:00:00 2001 From: Rayman4009 Date: Fri, 6 Oct 2023 12:25:45 -0800 Subject: [PATCH 4/4] Updated 2 --- src/Lab006.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Lab006.java b/src/Lab006.java index 73382c0..61abdac 100644 --- a/src/Lab006.java +++ b/src/Lab006.java @@ -21,7 +21,7 @@ public static void main(String[] args) { System.out.println("Give me a second integer"); String y = scanner.nextLine(); - Lab006 L = new Lab006(x, y); + Lab006 L = new Lab006(x, y) ; L.isDivisible(); public static int parseInt(String"x", String"y");