diff --git a/ch02/.idea/vcs.xml b/ch02/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/ch02/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch02/Arithmetic.java b/ch02/Arithmetic.java
new file mode 100644
index 0000000..6c58e37
--- /dev/null
+++ b/ch02/Arithmetic.java
@@ -0,0 +1,21 @@
+public class Arithmetic
+{
+ public static void main (String[]args)
+ {int num = 100;
+ int factor = 20;
+ int sum = 0;
+
+ sum= num + factor; //100+20
+ System.out.println("Addition sum: " + sum);
+ sum = num - factor; // 100-20
+ System.out.println("Subtraction sum: " + sum);
+
+ sum=num*factor; //100x20
+ System.out.println("Multiplication sum: " + sum);
+ sum=num/factor; //100/20
+ System.out.println("Division sum: " + sum);
+
+
+
+ }
+}
diff --git a/ch02/Assignment.java b/ch02/Assignment.java
new file mode 100644
index 0000000..8deb6d1
--- /dev/null
+++ b/ch02/Assignment.java
@@ -0,0 +1,23 @@
+public class Assignment
+{
+ public static void main (String[]args)
+ {
+ String txt="Fantastic ";
+ String lang="Java";
+ txt+=lang; //Assign concatenated String
+ System.out.println("Add & Assign Strings:" +txt);
+
+ int sum=10;
+ int num=20;
+ sum+=num; //Assign result (10+20=30)
+ System.out.println("Add & Assign Integers: "+sum);
+
+ int factor = 5;
+ sum*= factor; //Assign result (30x5=150)
+ System.out.println("Multiplication sum: "+ sum);
+
+ sum/= factor; //Assign result (150/5=30)
+ System.out.println("Division sum: "+ sum);
+
+ }
+}
diff --git a/ch02/Constants.java b/ch02/Constants.java
new file mode 100644
index 0000000..2b8ef74
--- /dev/null
+++ b/ch02/Constants.java
@@ -0,0 +1,21 @@
+public class Constants
+{
+ public static void main(String[]args)
+ {
+ final int TOUCHDOWN = 6;
+ final int CONVERSION = 1;
+ final int FIELDGOAL = 3;
+
+ int td, pat, fg, total;
+
+ td=4*TOUCHDOWN;
+ pat=3*CONVERSION;
+ fg=2*FIELDGOAL;
+ total = (td+pat+fg);
+
+ System.out.println("Score: " + total);
+
+ }
+}
+
+
diff --git a/ch02/DataTypes.java b/ch02/DataTypes.java
new file mode 100644
index 0000000..a986e55
--- /dev/null
+++ b/ch02/DataTypes.java
@@ -0,0 +1,16 @@
+public class DataTypes
+{
+ public static void main (String[]args)
+ {char letter = 'M';
+ String title = "Java in easy steps";
+ int number = 365;
+ float decimal = 98.6f;
+ boolean result = true;
+
+ System.out.println("Initial is " + letter);
+ System.out.println("Book is " + title);
+ System.out.println("Days are " + number);
+ System.out.println("Temperature is "+ decimal);
+ System.out.println("Answer is " + result);
+ }
+}
diff --git a/ch02/Date.java b/ch02/Date.java
new file mode 100644
index 0000000..50137ad
--- /dev/null
+++ b/ch02/Date.java
@@ -0,0 +1,30 @@
+public class Date
+
+{
+ public static void main (String[]args)
+ {
+ System.out.println("Date");
+ System.out.println("American format:");
+ String day = "Tuesday, ";
+ String date = "17th,";
+ String month = "April ";
+ String year = " 2018";
+ System.out.print(day);
+ System.out.print(month);
+ System.out.print(date);
+ System.out.println(year);
+
+
+
+ System.out.println("European format:");
+ String eday = "Tuesday ";
+ String edate = "17 ";
+ String emonth = "April ";
+ String eyear = "2018";
+ System.out.print(eday);
+ System.out.print(emonth);
+ System.out.print(edate);
+ System.out.print(eyear);
+ }
+ }
+
diff --git a/ch02/FirstVariable.java b/ch02/FirstVariable.java
new file mode 100644
index 0000000..104aec6
--- /dev/null
+++ b/ch02/FirstVariable.java
@@ -0,0 +1,12 @@
+public class FirstVariable
+{
+ public static void main(String[] args)
+ {
+ String message = "Initial value";
+ System.out.println(message);
+
+ message = "Modified value";
+ System.out.println(message);
+
+ }
+}
diff --git a/ch02/Time.java b/ch02/Time.java
new file mode 100644
index 0000000..3d7ef2b
--- /dev/null
+++ b/ch02/Time.java
@@ -0,0 +1,22 @@
+public class Time
+{
+ public static void main(String[] args)
+ {//
+ //undone
+ int hour = 15;
+
+ int minute = 39;
+ int second = 43;
+ System.out.println(hour);
+ System.out.println(minute);
+ System.out.println(second);
+
+
+ //
+
+
+ }
+}
+
+
+
diff --git a/ch02/Variables.java b/ch02/Variables.java
index a295abf..b9451ca 100644
--- a/ch02/Variables.java
+++ b/ch02/Variables.java
@@ -1,9 +1,13 @@
/**
* Examples from Chapter 2.
*/
-public class Variables {
+public class Variables
+{
+
+ public static void main(String[] args)
+ {
+//Christy
- public static void main(String[] args) {
String message;
int x;
@@ -59,7 +63,7 @@ public static void main(String[] args) {
System.out.println(0.1 * 10);
System.out.println(0.1 + 0.1 + 0.1 + 0.1 + 0.1
- + 0.1 + 0.1 + 0.1 + 0.1 + 0.1);
+ + 0.1 + 0.1 + 0.1 + 0.1 + 0.1);
double balance = 123.45; // potential rounding error
int balance2 = 12345; // total number of cents
diff --git a/ch03/Input.java b/ch03/Input.java
index de97dc0..78f2b6d 100644
--- a/ch03/Input.java
+++ b/ch03/Input.java
@@ -6,11 +6,13 @@ public class Input {
public static void main(String[] args) {
System.out.println(System.out);
- System.out.print(4.0 / 3.0);
+ System.out.println(4.0 / 3.0);
System.out.printf("Four thirds = %.3f", 4.0 / 3.0);
double pi = 3.14159;
double x = (int) pi * 20.0;
+
+
}
-}
+ }
\ No newline at end of file
diff --git a/ch03/Temperature.java b/ch03/Temperature.java
new file mode 100644
index 0000000..5432a40
--- /dev/null
+++ b/ch03/Temperature.java
@@ -0,0 +1,29 @@
+import java.util.Scanner;
+public class Temperature
+{public static void main(String[] args)
+{String line;
+
+//create some variables to hold the two temperature values
+ double celsius;
+ double fahrenheit;
+//create a scanner to read the keyboard input
+ Scanner in = new Scanner(System.in);
+
+ // prompt the user and get Celsius value
+ System.out.print("What is the temperature outside in degrees Celsius?");
+ //wait for the value from the keyboard and then
+ //assign it to the celsius variable
+ celsius = in.nextDouble();
+
+ //Show user the value they entered
+ System.out.println("You entered " + celsius + " for Celsius");
+//Do some math and convert from celsius and fahrenheit
+ fahrenheit = (celsius * 9.0/5.0)+32;
+ System.out.println("The temperature in Fahrenheit is: " + fahrenheit);
+
+
+
+
+}
+
+}
diff --git a/ch04/.idea/misc.xml b/ch04/.idea/misc.xml
new file mode 100644
index 0000000..e208459
--- /dev/null
+++ b/ch04/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch04/.idea/modules.xml b/ch04/.idea/modules.xml
new file mode 100644
index 0000000..740d4e8
--- /dev/null
+++ b/ch04/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch04/.idea/vcs.xml b/ch04/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/ch04/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch04/.idea/workspace.xml b/ch04/.idea/workspace.xml
new file mode 100644
index 0000000..7e358c3
--- /dev/null
+++ b/ch04/.idea/workspace.xml
@@ -0,0 +1,283 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1524083199065
+
+
+ 1524083199065
+
+
+ 1524100350176
+
+
+
+ 1524100350176
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch04/SimpleMethods.java b/ch04/SimpleMethods.java
new file mode 100644
index 0000000..cebc35a
--- /dev/null
+++ b/ch04/SimpleMethods.java
@@ -0,0 +1,38 @@
+import java.sql.SQLOutput;
+
+public class SimpleMethods
+{//This is the main method to assign values for 4-A and 4-B
+ public static void main(String[] args)
+ {//These are the variables for 4-A
+ printCount(5);
+ int count = 9;
+ printCount(count);
+ int someNumber = 3;
+ printCount(someNumber);
+ //These are the variables for 4-B
+ int num1 = 2;
+ int num2 = 4;
+ printSum(num1 + num2);
+ //These is the variable for 4-C
+ boolean isStudent=true;
+ printBoolean(isStudent);
+ }
+
+//This is the method for 4-A
+ public static void printCount(int count)
+ {
+ System.out.println("The count is: " + count);
+ }
+
+ //This is the method for 4-B
+ public static void printSum(int sum)
+ {
+System.out.println("The sum is: " + sum);
+ }
+
+ //This is the method for 4-C
+ public static void printBoolean (boolean isStudent)
+ {
+ System.out.println("I am a student: " + isStudent);
+ }
+}
\ No newline at end of file
diff --git a/ch04/Switch.java b/ch04/Switch.java
new file mode 100644
index 0000000..01ee8a3
--- /dev/null
+++ b/ch04/Switch.java
@@ -0,0 +1,4 @@
+public class Switch
+{public static void main(String[] args)
+
+}
diff --git a/ch04/ch04.iml b/ch04/ch04.iml
new file mode 100644
index 0000000..b107a2d
--- /dev/null
+++ b/ch04/ch04.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch05/.idea/misc.xml b/ch05/.idea/misc.xml
new file mode 100644
index 0000000..e208459
--- /dev/null
+++ b/ch05/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch05/.idea/modules.xml b/ch05/.idea/modules.xml
new file mode 100644
index 0000000..8aa42e1
--- /dev/null
+++ b/ch05/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch05/.idea/vcs.xml b/ch05/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/ch05/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch05/.idea/workspace.xml b/ch05/.idea/workspace.xml
new file mode 100644
index 0000000..0c7386b
--- /dev/null
+++ b/ch05/.idea/workspace.xml
@@ -0,0 +1,451 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1524153095375
+
+
+ 1524153095375
+
+
+ 1524168939598
+
+
+
+ 1524168939598
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch05/Comparison.java b/ch05/Comparison.java
new file mode 100644
index 0000000..ad7a6c3
--- /dev/null
+++ b/ch05/Comparison.java
@@ -0,0 +1,23 @@
+public class Comparison
+
+{
+ public static void main(String[]args)
+ {
+ String txt = "Fantastic " ;
+ String lang = "Java" ;
+ boolean state = (txt==lang); //Assign text result
+ System.out.println("String Equality Test: " + state);
+
+ state = (txt!=lang); // Assign result
+ System.out.println("String Inequaltiy Test: "+ state);
+
+ int dozen = 12;
+ int score = 20;
+ state = (dozen > score); //Assign result
+ System.out.println("Greater Than Test: " + state);
+
+ state = (dozen < score); // Assign result
+ System.out.println("Less Than Test:" + state);
+
+ }
+}
diff --git a/ch05/Condition.java b/ch05/Condition.java
new file mode 100644
index 0000000..dce7cb8
--- /dev/null
+++ b/ch05/Condition.java
@@ -0,0 +1,14 @@
+public class Condition
+
+{public static void main(String[]args)
+{
+ int num1 = 1357;
+ int num2= 2468;
+ String result;
+ result = (num1 % 2 !=0) ? "Odd" : "Even";
+ System.out.println(num1 + "is" + result);
+
+ result = (num2 % 2 !=0) ? "Odd" : "Even";
+ System.out.println(num2 + "is" + result);
+}
+}
diff --git a/ch05/Else.java b/ch05/Else.java
new file mode 100644
index 0000000..80a43ab
--- /dev/null
+++ b/ch05/Else.java
@@ -0,0 +1,18 @@
+public class Else
+{
+ public static void main(String[] args)
+ {
+ int hrs = 21;
+
+ if (hrs < 13)
+ {
+ System.out.println("Good morning: " + hrs);
+ } else if (hrs < 18)
+ {
+ System.out.println("Good afternoon: " + hrs);
+
+ }
+ else
+ System.out.println("Good evening: " + hrs);
+ }
+}
diff --git a/ch05/If.java b/ch05/If.java
new file mode 100644
index 0000000..52f12a3
--- /dev/null
+++ b/ch05/If.java
@@ -0,0 +1,16 @@
+public class If
+
+{
+ public static void main(String[] args)
+
+
+{ if(5>1)
+ System.out.println("Five is greater than one.");
+
+ if(2>4)
+ System.out.println("Two is less than four.");
+ System.out.println("Test succeeded");
+ }
+}
+
+
diff --git a/ch05/Logic.java b/ch05/Logic.java
new file mode 100644
index 0000000..60f23a6
--- /dev/null
+++ b/ch05/Logic.java
@@ -0,0 +1,18 @@
+public class Logic
+
+{public static void main(String[]args)
+ // Assign boolean
+{boolean yes = true;
+boolean no = false;
+// Test boolean both
+ System.out.println("Both YesYes True: " + (yes&&yes));
+ System.out.println("Both YesNo True: " + (yes&&no));
+ // Test boolean either
+ System.out.println( "Either YesYes True: " + (yes||yes));
+ System.out.println( "Either YesNo True: " + (yes||no));
+ System.out.println("Either NoNo True: " + (yes||yes));
+ //Show original and inverse value
+ System.out.println("Original Yes Value: " + yes);
+ System.out.println("Inverse Yes Value: " + !yes);
+}
+}
diff --git a/ch05/LogicMethods.java b/ch05/LogicMethods.java
new file mode 100644
index 0000000..206fcf7
--- /dev/null
+++ b/ch05/LogicMethods.java
@@ -0,0 +1,65 @@
+public class LogicMethods
+{
+ public static void main(String[] args)
+ {
+ int number = 3;
+ int number1 = 3;
+ int number2 = 3;
+ printIsLarge(number);
+ printIsLargeOrSmall(number);
+ printLargest(number1, number2);
+ printLargestOdd(number1, number2);
+ }
+
+ private static void printIsLarge(int number)
+ {
+ if (number > 99)
+ {
+ System.out.println("The number is large");
+ }
+ }
+
+ private static void printIsLargeOrSmall(int number)
+ {
+ if (number > 99)
+ {
+ System.out.println("The number is large");
+ }
+ if (number < 10)
+ {
+ System.out.println("The number is small");
+ }
+ }
+
+ private static void printLargest(int number1, int number2)
+ {
+ if (number1 > number2)
+ {
+ System.out.println("The largest number is: " + number1);
+ }
+ if (number2 > number1)
+ {
+ System.out.println("The largest number is: " + number2);
+ }
+ if (number1 == number2)
+ {
+ System.out.println("The numbers are equal");
+ }
+ }
+
+ private static void printLargestOdd(int number1, int number2)
+ {//determines if number is odd and then compares
+ if (number1 % 3 == 0 && number1 > number2)
+ {
+ System.out.println("The largest odd number is: " + number1);
+ }
+ if (number1 % 2 == 0)
+ {
+ System.out.println("Neither number is odd ");
+ }
+ if (number1 % 3 == 0 && number2 %3 == 0 && number1==number2)
+ {
+ System.out.println("Two odds make an even ");
+ }
+ }
+}
\ No newline at end of file
diff --git a/ch05/Precedence.java b/ch05/Precedence.java
new file mode 100644
index 0000000..c44603b
--- /dev/null
+++ b/ch05/Precedence.java
@@ -0,0 +1,16 @@
+public class Precedence
+
+{
+ public static void main(String[]args)
+ {int sum = 32 - 8 + 16 * 2; //16 x 2 = 32, + 24 = 56
+ System.out.println("Default order: " + sum);
+
+ sum = (32 - 8 + 16) * 2; // 24+16=40, x2 = 80
+ System.out.println("Specified order: " + sum);
+
+ sum = (32 - (8 + 16)) * 2; // 32-24=8, *2 = 16
+ System.out.println("Nested specific order: " + sum);
+
+ }
+}
+
diff --git a/ch05/Switch.java b/ch05/Switch.java
new file mode 100644
index 0000000..0fbb522
--- /dev/null
+++ b/ch05/Switch.java
@@ -0,0 +1,21 @@
+public class Switch
+{
+ public static void main(String[] args)
+
+ int month = 2, year = 2018, num = 31;
+
+ switch(month)
+
+ {
+ case 4:
+ case 6:
+ case 9:
+ case 11:
+ num = 30;
+ break;
+
+
+ }
+
+
+}
diff --git a/ch05/ch05.iml b/ch05/ch05.iml
new file mode 100644
index 0000000..b107a2d
--- /dev/null
+++ b/ch05/ch05.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06/.idea/misc.xml b/ch06/.idea/misc.xml
new file mode 100644
index 0000000..e208459
--- /dev/null
+++ b/ch06/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06/.idea/modules.xml b/ch06/.idea/modules.xml
new file mode 100644
index 0000000..b87d4ea
--- /dev/null
+++ b/ch06/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06/.idea/workspace.xml b/ch06/.idea/workspace.xml
new file mode 100644
index 0000000..38ce44a
--- /dev/null
+++ b/ch06/.idea/workspace.xml
@@ -0,0 +1,341 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1524237464668
+
+
+ 1524237464668
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch06/Demo.java b/ch06/Demo.java
new file mode 100644
index 0000000..8562e6c
--- /dev/null
+++ b/ch06/Demo.java
@@ -0,0 +1,38 @@
+public class Demo
+{
+ public static void main(String[] args)
+ {
+ int firstValue = 5;
+ int secondValue = 50;
+ int thirdValue = 200;
+
+ int firstValueBig = howBig(firstValue);
+ int secondValueBig = howBig(secondValue);
+ int thirdValueBig = howBig(thirdValue);
+
+ System.out.println("firstValue is " + firstValue + "howBig returns: " + firstValueBig);
+ System.out.println("secondValue is " + secondValue + "howBig returns: " + secondValueBig);
+ System.out.println("thirdValue is " + thirdValue + "howBig returns: " + thirdValueBig);
+ }
+
+
+ //returns 0 if value less than 10
+ //returns 1 if value 10 to 100
+ // returns 2 if value more than 100
+ private static int howBig(int value)
+ {
+ int answer;
+
+ if (value >= 10 && value <= 100)
+ {
+ answer = 1;
+ } else if (value > 100)
+ {
+ answer = 2;
+ } else
+ {
+ answer = 0;
+ }
+ return answer;
+ }
+}
\ No newline at end of file
diff --git a/ch06/Divisible.java b/ch06/Divisible.java
new file mode 100644
index 0000000..5f94059
--- /dev/null
+++ b/ch06/Divisible.java
@@ -0,0 +1,4 @@
+public class Divisible
+{ public static void main(String[] args)
+{}
+}
diff --git a/ch06/ch06.iml b/ch06/ch06.iml
new file mode 100644
index 0000000..b107a2d
--- /dev/null
+++ b/ch06/ch06.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch07/.idea/misc.xml b/ch07/.idea/misc.xml
new file mode 100644
index 0000000..e208459
--- /dev/null
+++ b/ch07/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch07/.idea/modules.xml b/ch07/.idea/modules.xml
new file mode 100644
index 0000000..644f3a5
--- /dev/null
+++ b/ch07/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch07/.idea/vcs.xml b/ch07/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/ch07/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch07/.idea/workspace.xml b/ch07/.idea/workspace.xml
new file mode 100644
index 0000000..3ad95e4
--- /dev/null
+++ b/ch07/.idea/workspace.xml
@@ -0,0 +1,526 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1524496252903
+
+
+ 1524496252903
+
+
+ 1524507065158
+
+
+
+ 1524507065158
+
+
+ 1524510163613
+
+
+
+ 1524510163613
+
+
+ 1524512819992
+
+
+
+ 1524512819992
+
+
+ 1524517357753
+
+
+
+ 1524517357753
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch07/Choice.java b/ch07/Choice.java
new file mode 100644
index 0000000..0cdf935
--- /dev/null
+++ b/ch07/Choice.java
@@ -0,0 +1,12 @@
+public class Choice
+{
+ public static void main(String[] args)
+ {
+ int num = 10;
+ for (int i = 0 + 1; i <= 10; i++)
+ {
+ System.out.println("The number is = " + i);
+ }
+ }
+
+}
diff --git a/ch07/Count.java b/ch07/Count.java
new file mode 100644
index 0000000..6173a83
--- /dev/null
+++ b/ch07/Count.java
@@ -0,0 +1,27 @@
+public class Count
+{
+ public static void main(String[] args)
+ {
+ int num = 0;
+ for (int i = 0+1; i <= 10; i++)
+ {
+ System.out.println("Counting up to 10 by 1 with for = " + i);
+ }
+
+ while(num<=10)
+ {
+ System.out.println("Counting up to 10 by 1 with while = " + num);
+ num++;
+ }
+
+ num = 1;
+ do
+ {
+ System.out.println("Counting up to 10 by 1 with do while = " + num);
+ num++;
+ }
+ while(num<=10);
+ }
+
+
+}
diff --git a/ch07/CountByEight.java b/ch07/CountByEight.java
new file mode 100644
index 0000000..16d7a3c
--- /dev/null
+++ b/ch07/CountByEight.java
@@ -0,0 +1,27 @@
+public class CountByEight
+{
+ public static void main(String[] args)
+ {
+ int num = 100;
+ for (int i = 100; i <= 100 && i >= -100; i = i - 8)
+ {
+ System.out.println("Decreasing by 8 with for = " + i);
+ }
+
+ while (num <= 100 && num>=-100)
+ {
+ System.out.println("Decreasing by 8 with while = " + num);
+ num = num - 8;
+ }
+
+ num = 100;
+ do
+ {
+ System.out.println("Decreasing by 8 with do while = " + num);
+ num = num - 8;
+ }
+ while (num <= 100 && num>=-100);
+
+ }
+
+}
diff --git a/ch07/CountByTens.java b/ch07/CountByTens.java
new file mode 100644
index 0000000..4fdf158
--- /dev/null
+++ b/ch07/CountByTens.java
@@ -0,0 +1,25 @@
+public class CountByTens
+{
+ public static void main(String[] args)
+ {
+ int num = 0;
+ for (int i = 10; i <= 100; i=i+10)
+ {
+ System.out.println("Counting up to 100 by 10 with for = " + i);
+ }
+
+ while (num <= 100)
+ {
+ System.out.println("Counting up to 100 by 10 with while = " + num);
+ num = num + 10;
+ }
+
+ num = 0;
+ do
+ {
+ System.out.println("Counting up to 100 by 10 with do while = " + num);
+ num = num + 10;
+ }
+ while (num <= 100);
+ }
+}
diff --git a/ch07/DoWhile.java b/ch07/DoWhile.java
new file mode 100644
index 0000000..d12abce
--- /dev/null
+++ b/ch07/DoWhile.java
@@ -0,0 +1,13 @@
+public class DoWhile
+{
+ public static void main (String[] args)
+ {
+ int num = 100;
+ do
+ {
+ System.out.println ("DoWhile Countup: " + num);
+ }
+ while (num <10);
+ }
+
+}
diff --git a/ch07/For.java b/ch07/For.java
new file mode 100644
index 0000000..46596d6
--- /dev/null
+++ b/ch07/For.java
@@ -0,0 +1,17 @@
+public class For
+{
+ public static void main(String[] args)
+ {
+ int num = 0;
+ for (int i = 1; i < 4; i++)
+ {
+ System.out.println("Outer Loop i=" + i);
+ }
+
+ for (int j = 1; j < 4; j++)
+ {
+ System.out.print("\tInner Loop j =" + j);
+ System.out.println("\t\tTotal num=" + (++num));
+ }
+ }
+}
diff --git a/ch07/While.java b/ch07/While.java
new file mode 100644
index 0000000..50a78a7
--- /dev/null
+++ b/ch07/While.java
@@ -0,0 +1,13 @@
+public class While
+{
+ public static void main(String[] args)
+ {
+ int num = 100;
+ while (num > 0)
+
+ {
+ System.out.println("While Countdown: " + num);
+ num -= 10;
+ }
+ }
+}
\ No newline at end of file
diff --git a/ch07/ch07.iml b/ch07/ch07.iml
new file mode 100644
index 0000000..b107a2d
--- /dev/null
+++ b/ch07/ch07.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch08/.idea/misc.xml b/ch08/.idea/misc.xml
new file mode 100644
index 0000000..e208459
--- /dev/null
+++ b/ch08/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch08/.idea/modules.xml b/ch08/.idea/modules.xml
new file mode 100644
index 0000000..39499a8
--- /dev/null
+++ b/ch08/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch08/.idea/vcs.xml b/ch08/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/ch08/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch08/.idea/workspace.xml b/ch08/.idea/workspace.xml
new file mode 100644
index 0000000..cdaeac2
--- /dev/null
+++ b/ch08/.idea/workspace.xml
@@ -0,0 +1,350 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1524514613632
+
+
+ 1524514613632
+
+
+ 1524581437789
+
+
+
+ 1524581437789
+
+
+ 1524602095195
+
+
+
+ 1524602095195
+
+
+ 1524604357584
+
+
+
+ 1524604357584
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ file://$PROJECT_DIR$/Array.java
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch08/Array.java b/ch08/Array.java
new file mode 100644
index 0000000..09b50a2
--- /dev/null
+++ b/ch08/Array.java
@@ -0,0 +1,18 @@
+public class Array
+{
+
+ public static void main (String[]args)
+ {
+
+ String[]str = {"Much ", "More", " Java"};
+ int[] num = new int[3];
+ num[0] = 100;
+ num[1] = 200;
+ str[1] = "Better" ;
+ System.out.println( "String array length is " + str.length);
+ System.out.println( "Integer array length is " + num.length);
+ System.out.println( num[0]+ "," +num[1]+ "," + num[2]);
+ System.out.println(str[0]+ str[1]+ str[2]);
+ }
+
+}
diff --git a/ch08/ArrayDemo.java b/ch08/ArrayDemo.java
new file mode 100644
index 0000000..cf83862
--- /dev/null
+++ b/ch08/ArrayDemo.java
@@ -0,0 +1,109 @@
+public class ArrayDemo
+{
+ public static void main(String[] args)
+ {
+ int[] values = {1,5,9}; // These are the values for 8-A in main
+ printArray(values);
+ System.out.println();
+
+
+ int[] sumNumbers = {5, 7, 13}; //These are the values for 8-B in main
+ int sum = arrayTotal(sumNumbers);
+ printArray(sumNumbers);
+ System.out.println("The numbers added up to " + sum);
+
+ int[] maxNumbers = {5, 8, 21, 19, 2}; //These are the values for 8-C in main
+ int max = arrayMax(maxNumbers);
+ printArray(maxNumbers);
+ System.out.println("The highest number is " + max);
+
+ int[] indexNumbers = {78, 23, 9, 34}; //These are the values for 8-D in main
+ int index = arrayMaxIndex(indexNumbers);
+ printArray(indexNumbers);
+ System.out.println("The highest index is " + index);
+
+ double[] avgValue = {10.0, 15.0, 20.0}; //These are the values for 8-E in main
+ double average = arrayAverage(avgValue);
+ System.out.println("The average is " + average);
+
+ int [] values2 = new int[10]; // 8-F adding int using new keyword
+ values2[0]=4;
+ values2[3]=2;
+ values2[9]=4;
+ printArray(values2);
+
+ String [] values3 = new String[10]; //8-G adding string using new keyword
+ values3[0]="Hi";
+ values3[3]="Hello";
+ values3[9]="Bye";
+ printArray(values3);
+ }
+
+ private static void printArray(int[] values)//This is the method for 8-A
+ {
+ for (int value : values)
+ System.out.println(value);
+ }
+ private static void printArray(String[] values)//This is the method for 8-A
+ {
+ for (String value : values)
+ System.out.println(value);
+ }
+
+ private static int arrayTotal(int[] values) //This is the method for 8-B
+ {
+ int sum = 0;
+ for (int value : values)
+ {
+ sum = sum + value;
+ }
+ return sum;
+ }
+
+ private static int arrayMax(int[] values) //This is the method for 8-C
+ {
+ int max = 0;
+ for (int value : values)
+ {
+ if (value > max)
+ {
+ max = value;
+ }
+ }
+ return max;
+ }
+
+ private static int arrayMaxIndex(int[] values) //This is the method for 8-D
+ {
+ int max = 0;
+ int indexMax = 0;
+ int index = 0;
+
+ for (int value : values)
+ {
+ if (value > max)
+ {
+ max = value;
+ indexMax = index;
+ }
+ index = index + 1;
+ }
+ return indexMax;
+ }
+
+ private static double arrayAverage(double[] values) //This is the method for 8-E
+ {
+ double sum = 0.0;
+ for (double value : values)
+ {
+ sum = (sum + value);
+ }
+ double average = sum/values.length;
+ return average;
+ }
+
+
+}
+
+
+
diff --git a/ch08/ch08.iml b/ch08/ch08.iml
new file mode 100644
index 0000000..b107a2d
--- /dev/null
+++ b/ch08/ch08.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch09/.idea/misc.xml b/ch09/.idea/misc.xml
new file mode 100644
index 0000000..e208459
--- /dev/null
+++ b/ch09/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch09/.idea/modules.xml b/ch09/.idea/modules.xml
new file mode 100644
index 0000000..dbdfbb9
--- /dev/null
+++ b/ch09/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch09/.idea/vcs.xml b/ch09/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/ch09/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch09/.idea/workspace.xml b/ch09/.idea/workspace.xml
new file mode 100644
index 0000000..66be2de
--- /dev/null
+++ b/ch09/.idea/workspace.xml
@@ -0,0 +1,413 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1524677818926
+
+
+ 1524677818926
+
+
+ 1524683597695
+
+
+
+ 1524683597695
+
+
+ 1524689300177
+
+
+
+ 1524689300177
+
+
+ 1524692322089
+
+
+
+ 1524692322089
+
+
+ 1524692952531
+
+
+
+ 1524692952531
+
+
+ 1524705730789
+
+
+
+ 1524705730789
+
+
+ 1524756118442
+
+
+
+ 1524756118442
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch09/StringUtil.java b/ch09/StringUtil.java
new file mode 100644
index 0000000..e1035fc
--- /dev/null
+++ b/ch09/StringUtil.java
@@ -0,0 +1,104 @@
+public class StringUtil
+{
+ public static void main(String[] args)
+ {
+ System.out.println("Welcome to StringUtil");
+
+ String firstCharacterofHello = getFirstCharacter("Hello");
+ System.out.println("getFirstCharacter for Hello returns " + firstCharacterofHello);
+
+ String firstCharacterofGoodbye = getFirstCharacter("Goodbye");
+ System.out.println("getFirstCharacter for Goodbye returns " + firstCharacterofGoodbye);
+
+ String lastCharacterofHello = getLastCharacter("Hello");
+ System.out.println("getLastCharacter for Hello returns " + lastCharacterofHello);
+
+ String firstTwoCharactersOfHello = getFirstTwoCharacters("Hello");
+ System.out.println("getFirstTwoCharacters for Hello returns " + firstTwoCharactersOfHello);
+
+ String firstTwoCharactersOfGoodbye = getFirstTwoCharacters("Goodbye");
+ System.out.println("getFirstTwoCharacters for Goodbye returns " + firstTwoCharactersOfGoodbye);
+
+ String lastTwoCharactersOfHello = getLastTwoCharacters("Hello");
+ System.out.println("getLastTwoCharacters for Hello returns " + lastTwoCharactersOfHello);
+
+ String lastTwoCharactersOfGoodbye = getLastTwoCharacters("Goodbye");
+ System.out.println("getLastTwoCharacters for Goodbye returns " + lastTwoCharactersOfGoodbye);
+
+ String allButFirstThreeCharactersOfHello = getAllButFirstThreeCharacters("Hello");
+ System.out.println("allButFirstThreeCharacters for Hello returns " + allButFirstThreeCharactersOfHello);
+
+ String allButFirstThreeCharactersOfGoodbye = getAllButFirstThreeCharacters("Goodbye");
+ System.out.println("allButFirstThreeCharacters for Goodbye returns " + allButFirstThreeCharactersOfGoodbye);
+
+ //HOW DO I GET/PRINT THE INDEX??? 9-B-6
+ String printCharacters = getprintCharacters("Hello");
+
+ printPhoneNumber("501-555-0100");
+
+
+ }
+
+
+ private static String getLastCharacter(String value)
+ {
+ int startIndex = value.length() - 1;
+ return value.substring(startIndex, startIndex + 1);
+
+ }
+
+ private static String getFirstCharacter(String value)
+ {
+ return value.substring(0, 1);
+ }
+
+ private static String getFirstTwoCharacters(String value)
+ {
+ return value.substring(0, 2);
+ }
+
+ private static String getLastTwoCharacters(String value)
+ {
+ int startIndex = value.length() - 2;
+ return value.substring(startIndex, startIndex + 2);
+ }
+
+ private static String getAllButFirstThreeCharacters(String value)
+ {
+ return value.substring(3);
+ }
+
+ private static String getprintCharacters(String value)
+ {
+ for
+ (int i = 0; i < value.length(); i++)
+ {
+ char letter = value.charAt(i);
+ //int = value.substring(i);////HOW DO I PRINT THE INDEX???
+ System.out.println(letter + ":");
+ }
+ return value;
+ }
+
+ private static void printPhoneNumber(String phoneNumber)
+ {
+ String areaCode = phoneNumber.substring(0,3);
+ String exchange = phoneNumber.substring(4,7);
+ String lineNumber = phoneNumber.substring(8,12);
+ System.out.println("Area Code: " + areaCode + " Exchange: " + exchange + " Line Number: " + lineNumber);
+ }
+}
+
+
+
+ //private static void String (findFirstE)
+ //{
+ //return int index = value.indexOf('e');
+ //}
+
+ //private static String isFinn (String value)
+
+ //if name1=="Finn"
+ //{
+ //return = true;
+ //}}
\ No newline at end of file
diff --git a/ch09/ch09.iml b/ch09/ch09.iml
new file mode 100644
index 0000000..b107a2d
--- /dev/null
+++ b/ch09/ch09.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch10/.idea/misc.xml b/ch10/.idea/misc.xml
new file mode 100644
index 0000000..e208459
--- /dev/null
+++ b/ch10/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch10/.idea/modules.xml b/ch10/.idea/modules.xml
new file mode 100644
index 0000000..5794ef7
--- /dev/null
+++ b/ch10/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch10/.idea/vcs.xml b/ch10/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/ch10/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch10/.idea/workspace.xml b/ch10/.idea/workspace.xml
new file mode 100644
index 0000000..5fc7509
--- /dev/null
+++ b/ch10/.idea/workspace.xml
@@ -0,0 +1,276 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1524756149220
+
+
+ 1524756149220
+
+
+ 1524778544508
+
+
+
+ 1524778544508
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch10/Student.java b/ch10/Student.java
new file mode 100644
index 0000000..dc582b6
--- /dev/null
+++ b/ch10/Student.java
@@ -0,0 +1,33 @@
+public class Student
+{
+ private String name;
+ private int studentId;
+ private double gpa;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public int getStudentId()
+ {
+ return studentId;
+ }
+
+ public double getGpa()
+ {
+ return gpa;
+ }
+
+ public Student (String name, int studentId)
+ {
+ this.name = name;
+ this.studentId = studentId;
+ }
+
+
+
+
+
+
+}
diff --git a/ch10/StudentTester.java b/ch10/StudentTester.java
new file mode 100644
index 0000000..155b7b4
--- /dev/null
+++ b/ch10/StudentTester.java
@@ -0,0 +1,42 @@
+public class StudentTester
+{
+ public static void main(String[] args)
+ {
+ Student maggie = new Student("Maggie", 1);
+ System.out.println(maggie.getName());
+
+ Student tim = new Student("Tim", 2);
+ System.out.println(tim.getName());
+
+ Student joseph = new Student("Joseph", 3);
+ System.out.println(joseph.getName());
+
+ Student josiah = new Student("Josiah", 4);
+ System.out.println(josiah.getName());
+
+ Student christy = new Student("Christy", 5);
+ System.out.println(christy.getName());
+
+ Student luke = new Student("Luke", 6);
+ System.out.println(luke.getName());
+
+ Student[] frontRowStudents = new Student[3];
+ frontRowStudents[0] = maggie;
+ frontRowStudents[1] = tim;
+ frontRowStudents[2] = joseph;
+ printStudents(frontRowStudents);
+
+ Student[] backRowStudents = new Student[3];
+ backRowStudents[0] = josiah;
+ backRowStudents[1] = christy;
+ backRowStudents[2] = luke;
+ printStudents(backRowStudents);
+ }
+ private static void printStudents(Student[] students)
+ {
+ for (Student student :students)
+ {
+ System.out.println(student.getName());
+ }
+ }
+}
\ No newline at end of file
diff --git a/ch10/ch10.iml b/ch10/ch10.iml
new file mode 100644
index 0000000..b107a2d
--- /dev/null
+++ b/ch10/ch10.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch11/.idea/misc.xml b/ch11/.idea/misc.xml
new file mode 100644
index 0000000..e208459
--- /dev/null
+++ b/ch11/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch11/.idea/modules.xml b/ch11/.idea/modules.xml
new file mode 100644
index 0000000..6a1ca0a
--- /dev/null
+++ b/ch11/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch11/.idea/vcs.xml b/ch11/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/ch11/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch11/.idea/workspace.xml b/ch11/.idea/workspace.xml
new file mode 100644
index 0000000..0ad3c61
--- /dev/null
+++ b/ch11/.idea/workspace.xml
@@ -0,0 +1,393 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1524855333271
+
+
+ 1524855333271
+
+
+ 1524863354043
+
+
+
+ 1524863354043
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ch11/Date.java b/ch11/Date.java
new file mode 100644
index 0000000..8bdaa4b
--- /dev/null
+++ b/ch11/Date.java
@@ -0,0 +1,37 @@
+public class Date
+{
+ private int day;
+ private int month;
+ private int year;
+
+ public Date (int day, int month, int year)
+ {
+ this.day=day;
+ this.month=month;
+ this.year=year;
+ }
+
+ public int getDay()
+ {
+ return day;
+ }
+
+ public int getMonth()
+ {
+ return month;
+ }
+
+ public int getYear()
+ {
+ return year;
+ }
+
+ public String getFormattedDate()
+ {
+ String formattedDate = year + "-" + month + "-" + day;
+ return formattedDate;
+ }
+}
+
+
+
diff --git a/ch11/DateTester.java b/ch11/DateTester.java
new file mode 100644
index 0000000..bbef763
--- /dev/null
+++ b/ch11/DateTester.java
@@ -0,0 +1,12 @@
+public class DateTester
+{
+ public static void main(String[] args)
+ {
+ Date currentDate = new Date(27, 4, 2018);
+
+ System.out.println(currentDate.getFormattedDate());
+
+ }
+
+
+}
diff --git a/ch11/Planet.java b/ch11/Planet.java
new file mode 100644
index 0000000..d181f3a
--- /dev/null
+++ b/ch11/Planet.java
@@ -0,0 +1,14 @@
+public class Planet
+{
+ private String name;
+
+ public Planet(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
diff --git a/ch11/PlanetTester.java b/ch11/PlanetTester.java
new file mode 100644
index 0000000..792f31b
--- /dev/null
+++ b/ch11/PlanetTester.java
@@ -0,0 +1,37 @@
+public class PlanetTester
+{
+ public static void main(String[] args)
+ {
+ Planet mercury = new Planet("Mercury");
+ Planet venus = new Planet("Venus");
+ Planet earth = new Planet("Earth");
+ Planet mars = new Planet("Mars");
+ Planet jupiter = new Planet("Jupiter");
+ Planet saturn = new Planet("Saturn");
+ Planet uranus = new Planet("Uranus");
+ Planet neptune = new Planet("Neptune");
+ Planet pluto = new Planet("Pluto");
+
+ Planet[] solarSystemPlanets = new Planet[9];
+ solarSystemPlanets[0] = mercury;
+ solarSystemPlanets[1] = venus;
+ solarSystemPlanets[2] = earth;
+ solarSystemPlanets[3] = mars;
+ solarSystemPlanets[4] = jupiter;
+ solarSystemPlanets[5] = saturn;
+ solarSystemPlanets[6] = uranus;
+ solarSystemPlanets[7] = neptune;
+ solarSystemPlanets[8] = pluto;
+
+ printPlanet(solarSystemPlanets);
+
+ }
+
+ private static void printPlanet(Planet[] Planet)
+ {
+ for (Planet planet : Planet)
+ {
+ System.out.println(planet.getName());
+ }
+ }
+}
diff --git a/ch11/ch11.iml b/ch11/ch11.iml
new file mode 100644
index 0000000..b107a2d
--- /dev/null
+++ b/ch11/ch11.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file