let's see if the breaks eclipse
This commit is contained in:
commit
c3eca41868
10
Java/.classpath
Normal file
10
Java/.classpath
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
17
Java/.project
Normal file
17
Java/.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Java</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
2
Java/.settings/org.eclipse.core.resources.prefs
Normal file
2
Java/.settings/org.eclipse.core.resources.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
11
Java/.settings/org.eclipse.jdt.core.prefs
Normal file
11
Java/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=17
|
||||
BIN
Java/bin/module-info.class
Normal file
BIN
Java/bin/module-info.class
Normal file
Binary file not shown.
8
Java/src/module-info.java
Normal file
8
Java/src/module-info.java
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
module Java {
|
||||
}
|
||||
6
dropbox01/.classpath
Normal file
6
dropbox01/.classpath
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="src" path=""/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
||||
17
dropbox01/.project
Normal file
17
dropbox01/.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>dropbox01</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
BIN
dropbox01/Chapter1Example1.class
Normal file
BIN
dropbox01/Chapter1Example1.class
Normal file
Binary file not shown.
25
dropbox01/Chapter1Example1.java
Normal file
25
dropbox01/Chapter1Example1.java
Normal file
@ -0,0 +1,25 @@
|
||||
/**
|
||||
|
||||
* Assignment 1
|
||||
|
||||
* Course: CISS238
|
||||
|
||||
* Student: Scott Steely
|
||||
|
||||
* Date: August 26, 2025
|
||||
|
||||
*/
|
||||
|
||||
class Chapter1Example1
|
||||
|
||||
{
|
||||
|
||||
public static void main(String[] args)
|
||||
|
||||
{
|
||||
|
||||
System.out.println("Hello, my name is Scott.");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
BIN
dropbox01/edu/ccis/Program.class
Normal file
BIN
dropbox01/edu/ccis/Program.class
Normal file
Binary file not shown.
26
dropbox01/edu/ccis/Program.java
Normal file
26
dropbox01/edu/ccis/Program.java
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
|
||||
* Assignment 2
|
||||
|
||||
* Course: CISS238
|
||||
|
||||
* Student: Scott Steely
|
||||
|
||||
* Date: August 26, 2025
|
||||
|
||||
*/
|
||||
|
||||
package edu.ccis;
|
||||
|
||||
public class Program {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(".... ....");
|
||||
System.out.println(". . ");
|
||||
System.out.println(".... ....");
|
||||
System.out.println(" . .");
|
||||
System.out.println(".... ....");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
10
dropbox02/.classpath
Normal file
10
dropbox02/.classpath
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
17
dropbox02/.project
Normal file
17
dropbox02/.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>dropbox02</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
2
dropbox02/.settings/org.eclipse.core.resources.prefs
Normal file
2
dropbox02/.settings/org.eclipse.core.resources.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
11
dropbox02/.settings/org.eclipse.jdt.core.prefs
Normal file
11
dropbox02/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=17
|
||||
BIN
dropbox02/bin/miles2kilometers/java/Miles2kilometers.class
Normal file
BIN
dropbox02/bin/miles2kilometers/java/Miles2kilometers.class
Normal file
Binary file not shown.
BIN
dropbox02/bin/module-info.class
Normal file
BIN
dropbox02/bin/module-info.class
Normal file
Binary file not shown.
36
dropbox02/miles2kilometers.java
Normal file
36
dropbox02/miles2kilometers.java
Normal file
@ -0,0 +1,36 @@
|
||||
/**
|
||||
|
||||
* Assignment 2
|
||||
|
||||
* Course: CISS238
|
||||
|
||||
* Student: Scott Steely
|
||||
|
||||
* Date: Sep 6, 2025
|
||||
|
||||
*/
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class MilesToKilometersConverter {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
// Create object to get input
|
||||
Scanner input = new Scanner(System.in);
|
||||
|
||||
// Prompt user to enter miles
|
||||
System.out.print("Enter the number of miles you drove today: ");
|
||||
|
||||
// Read miles
|
||||
double miles = input.nextDouble();
|
||||
|
||||
// Convert miles to kilometers (1 mile = 1.60934 kilometers)
|
||||
double kilometers = miles * 1.60934;
|
||||
|
||||
// Display results
|
||||
System.out.printf("%.2f miles is equal to %.2f kilometers.", miles, kilometers);
|
||||
|
||||
input.close();
|
||||
}
|
||||
}
|
||||
24
dropbox02/src/miles2kilometers/java/Miles2kilometers.java
Normal file
24
dropbox02/src/miles2kilometers/java/Miles2kilometers.java
Normal file
@ -0,0 +1,24 @@
|
||||
package miles2kilometers.java;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Miles2kilometers {
|
||||
public static void main(String[] args) {
|
||||
|
||||
// Create object to get user input
|
||||
Scanner input = new Scanner(System.in);
|
||||
|
||||
// Prompt for miles
|
||||
System.out.print("Enter the number of miles you drove today: ");
|
||||
|
||||
// Read the miles entered
|
||||
double miles = input.nextDouble();
|
||||
|
||||
// Convert
|
||||
double kilometers = miles * 1.60934;
|
||||
|
||||
// Display the results
|
||||
System.out.printf("%.2f miles is equal to %.2f kilometers.", miles, kilometers);
|
||||
|
||||
input.close();
|
||||
}
|
||||
}
|
||||
8
dropbox02/src/module-info.java
Normal file
8
dropbox02/src/module-info.java
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
module dropbox02 {
|
||||
}
|
||||
10
dropbox03/.classpath
Normal file
10
dropbox03/.classpath
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
17
dropbox03/.project
Normal file
17
dropbox03/.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>dropbox03</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
2
dropbox03/.settings/org.eclipse.core.resources.prefs
Normal file
2
dropbox03/.settings/org.eclipse.core.resources.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
11
dropbox03/.settings/org.eclipse.jdt.core.prefs
Normal file
11
dropbox03/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=17
|
||||
BIN
dropbox03/bin/dropbox03/TempConverter.class
Normal file
BIN
dropbox03/bin/dropbox03/TempConverter.class
Normal file
Binary file not shown.
BIN
dropbox03/bin/module-info.class
Normal file
BIN
dropbox03/bin/module-info.class
Normal file
Binary file not shown.
44
dropbox03/src/dropbox03/TempConverter.java
Normal file
44
dropbox03/src/dropbox03/TempConverter.java
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
|
||||
* Assignment 3
|
||||
|
||||
* Course: CISS238
|
||||
|
||||
* Student: Scott Steely
|
||||
|
||||
* Date: Sep 6, 2025
|
||||
|
||||
*/
|
||||
|
||||
package dropbox03;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class TempConverter {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
// prompt user for today's temperature
|
||||
|
||||
System.out.println("Enter today's temperature in Fahrenheit:");
|
||||
|
||||
Scanner input = new Scanner(System.in);
|
||||
|
||||
double temperatureInFahrenheit = input.nextDouble();
|
||||
|
||||
// convert the temperature from Fahrenheit to Celsius
|
||||
|
||||
double temperatureInCelsius = (temperatureInFahrenheit - 32) * 5/9;
|
||||
|
||||
// display
|
||||
|
||||
System.out.println("Temp(Fahrenheit): " + temperatureInFahrenheit);
|
||||
|
||||
System.out.println("Temp(Celsius): " + temperatureInCelsius);
|
||||
|
||||
// close the input object
|
||||
|
||||
input.close();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
8
dropbox03/src/module-info.java
Normal file
8
dropbox03/src/module-info.java
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
module dropbox03 {
|
||||
}
|
||||
10
dropbox04/.classpath
Normal file
10
dropbox04/.classpath
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
17
dropbox04/.project
Normal file
17
dropbox04/.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>dropbox04</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
2
dropbox04/.settings/org.eclipse.core.resources.prefs
Normal file
2
dropbox04/.settings/org.eclipse.core.resources.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
11
dropbox04/.settings/org.eclipse.jdt.core.prefs
Normal file
11
dropbox04/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=17
|
||||
BIN
dropbox04/bin/dropbox04/Chapter1Example4.class
Normal file
BIN
dropbox04/bin/dropbox04/Chapter1Example4.class
Normal file
Binary file not shown.
BIN
dropbox04/bin/module-info.class
Normal file
BIN
dropbox04/bin/module-info.class
Normal file
Binary file not shown.
61
dropbox04/src/dropbox04/Chapter1Example4.java
Normal file
61
dropbox04/src/dropbox04/Chapter1Example4.java
Normal file
@ -0,0 +1,61 @@
|
||||
/**
|
||||
|
||||
* Assignment 4
|
||||
|
||||
* Course: CISS238
|
||||
|
||||
* Student: Scott Steely
|
||||
|
||||
* Date: Sep 6, 2025
|
||||
|
||||
*/
|
||||
package dropbox04;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Chapter1Example4 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Scanner input = new Scanner(System.in);
|
||||
|
||||
System.out.print("Enter your name: ");
|
||||
|
||||
String name = input.nextLine();
|
||||
|
||||
System.out.print("Enter the number of credit hours completed: ");
|
||||
|
||||
int creditHours = input.nextInt();
|
||||
|
||||
String cohort = "";
|
||||
|
||||
if (creditHours >= 0 && creditHours <= 30) {
|
||||
|
||||
cohort = "freshman";
|
||||
|
||||
} else if (creditHours >= 31 && creditHours <= 60) {
|
||||
|
||||
cohort = "sophomore";
|
||||
|
||||
} else if (creditHours >= 61 && creditHours <= 90) {
|
||||
|
||||
cohort = "junior";
|
||||
|
||||
} else if (creditHours >= 91) {
|
||||
|
||||
cohort = "senior";
|
||||
|
||||
} else {
|
||||
|
||||
System.out.println("Invalid credit hours entered.");
|
||||
|
||||
System.exit(0);
|
||||
|
||||
}
|
||||
|
||||
System.out.println("Hi "+ name + ", you are a " + cohort + ".");
|
||||
|
||||
input.close();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
8
dropbox04/src/module-info.java
Normal file
8
dropbox04/src/module-info.java
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
module dropbox04 {
|
||||
}
|
||||
10
dropbox05/.classpath
Normal file
10
dropbox05/.classpath
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
28
dropbox05/.project
Normal file
28
dropbox05/.project
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>dropbox05</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1757569990157</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
<arguments>node_modules|.metadata|archetype-resources|META-INF/maven|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
2
dropbox05/.settings/org.eclipse.core.resources.prefs
Normal file
2
dropbox05/.settings/org.eclipse.core.resources.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
11
dropbox05/.settings/org.eclipse.jdt.core.prefs
Normal file
11
dropbox05/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=17
|
||||
BIN
dropbox05/bin/dropbox05/DivisibleByThree.class
Normal file
BIN
dropbox05/bin/dropbox05/DivisibleByThree.class
Normal file
Binary file not shown.
BIN
dropbox05/bin/module-info.class
Normal file
BIN
dropbox05/bin/module-info.class
Normal file
Binary file not shown.
38
dropbox05/src/dropbox05/DivisibleByThree.java
Normal file
38
dropbox05/src/dropbox05/DivisibleByThree.java
Normal file
@ -0,0 +1,38 @@
|
||||
/**
|
||||
|
||||
* Assignment 5
|
||||
|
||||
* Course: CISS238
|
||||
|
||||
* Student: Scott Steely
|
||||
|
||||
* Date: Sep 6, 2025
|
||||
|
||||
*/
|
||||
package dropbox05;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class DivisibleByThree {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
// Create a Scanner object to read user input
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
|
||||
// Prompt the user to enter an integer
|
||||
System.out.print("Enter an integer: ");
|
||||
|
||||
// Read the integer entered by the user
|
||||
int number = scanner.nextInt();
|
||||
|
||||
// Check if the number is divisible by 3 using the modulo operator (%)
|
||||
if (number % 3 == 0) {
|
||||
System.out.println("The number is divisible by 3");
|
||||
} else {
|
||||
System.out.println("The number is not divisible by 3");
|
||||
}
|
||||
|
||||
// Close the scanner
|
||||
scanner.close();
|
||||
}
|
||||
}
|
||||
8
dropbox05/src/module-info.java
Normal file
8
dropbox05/src/module-info.java
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
module dropbox05 {
|
||||
}
|
||||
10
dropbox06/.classpath
Normal file
10
dropbox06/.classpath
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
28
dropbox06/.project
Normal file
28
dropbox06/.project
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>dropbox06</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1757569990194</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
<arguments>node_modules|.metadata|archetype-resources|META-INF/maven|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
2
dropbox06/.settings/org.eclipse.core.resources.prefs
Normal file
2
dropbox06/.settings/org.eclipse.core.resources.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
11
dropbox06/.settings/org.eclipse.jdt.core.prefs
Normal file
11
dropbox06/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=17
|
||||
BIN
dropbox06/bin/dropbox06/Trip.class
Normal file
BIN
dropbox06/bin/dropbox06/Trip.class
Normal file
Binary file not shown.
BIN
dropbox06/bin/dropbox06/TripTest.class
Normal file
BIN
dropbox06/bin/dropbox06/TripTest.class
Normal file
Binary file not shown.
BIN
dropbox06/bin/module-info.class
Normal file
BIN
dropbox06/bin/module-info.class
Normal file
Binary file not shown.
40
dropbox06/src/dropbox06/Trip.java
Normal file
40
dropbox06/src/dropbox06/Trip.java
Normal file
@ -0,0 +1,40 @@
|
||||
package dropbox06;
|
||||
public class Trip {
|
||||
// fields
|
||||
private double milesDriven;
|
||||
private double gasolineUsed;
|
||||
// accessors/getter
|
||||
public double getMilesDriven() {
|
||||
return milesDriven;
|
||||
}
|
||||
public double getGasolineUsed() {
|
||||
return gasolineUsed;
|
||||
}
|
||||
// mutators/setter
|
||||
public void setMilesDriven(double milesDriven) {
|
||||
this.milesDriven = milesDriven;
|
||||
}
|
||||
public void setGasolineUsed(double gasolineUsed) {
|
||||
this.gasolineUsed = gasolineUsed;
|
||||
}
|
||||
// constructor
|
||||
public Trip(double milesDriven, double gasolineUsed) {
|
||||
this.milesDriven = milesDriven;
|
||||
this.gasolineUsed = gasolineUsed;
|
||||
}
|
||||
// method
|
||||
public double getMilesPerGallon() {
|
||||
double mpg = 0.0;
|
||||
mpg = milesDriven / gasolineUsed;
|
||||
return mpg;
|
||||
}
|
||||
// toString method
|
||||
@Override
|
||||
public String toString() {
|
||||
String str;
|
||||
str = String.format("Miles driven: %.2f%nGassoline Used: "
|
||||
+ "%.2f%nMiles Per Gallon: %.2f",
|
||||
getMilesDriven(), getGasolineUsed(), getMilesPerGallon());
|
||||
return str;
|
||||
}
|
||||
}
|
||||
20
dropbox06/src/dropbox06/TripTest.java
Normal file
20
dropbox06/src/dropbox06/TripTest.java
Normal file
@ -0,0 +1,20 @@
|
||||
package dropbox06;
|
||||
import java.util.Scanner;
|
||||
public class TripTest {
|
||||
public static void main(String[] args) {
|
||||
Scanner input = new Scanner(System.in);
|
||||
// local variables to hold user input
|
||||
double milesDriven = 0.0;
|
||||
double gasolineUsed = 0.0;
|
||||
// prompt the user for input
|
||||
System.out.println("Enter miles driven: ");
|
||||
milesDriven = input.nextDouble();
|
||||
System.out.println("Enter gasoline used: ");
|
||||
gasolineUsed = input.nextDouble();
|
||||
// create an object
|
||||
Trip trip = new Trip(milesDriven, gasolineUsed);
|
||||
// display output
|
||||
System.out.println(trip);
|
||||
input.close();
|
||||
}
|
||||
}
|
||||
8
dropbox06/src/module-info.java
Normal file
8
dropbox06/src/module-info.java
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
module dropbox06 {
|
||||
}
|
||||
10
dropbox07/.classpath
Normal file
10
dropbox07/.classpath
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
17
dropbox07/.project
Normal file
17
dropbox07/.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>dropbox07</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
2
dropbox07/.settings/org.eclipse.core.resources.prefs
Normal file
2
dropbox07/.settings/org.eclipse.core.resources.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
11
dropbox07/.settings/org.eclipse.jdt.core.prefs
Normal file
11
dropbox07/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=17
|
||||
BIN
dropbox07/bin/dropbox07/RetailTax.class
Normal file
BIN
dropbox07/bin/dropbox07/RetailTax.class
Normal file
Binary file not shown.
BIN
dropbox07/bin/dropbox07/TaxTest.class
Normal file
BIN
dropbox07/bin/dropbox07/TaxTest.class
Normal file
Binary file not shown.
BIN
dropbox07/bin/module-info.class
Normal file
BIN
dropbox07/bin/module-info.class
Normal file
Binary file not shown.
42
dropbox07/src/dropbox07/RetailTax.java
Normal file
42
dropbox07/src/dropbox07/RetailTax.java
Normal file
@ -0,0 +1,42 @@
|
||||
package dropbox07;
|
||||
|
||||
public class RetailTax {
|
||||
// fields
|
||||
private double salesAmount;
|
||||
private double taxRate;
|
||||
// accessors/getter
|
||||
public double getSalesAmount() {
|
||||
return salesAmount;
|
||||
}
|
||||
public double getTaxRate() {
|
||||
return taxRate;
|
||||
}
|
||||
// mutators/setter
|
||||
public void setSalesAmount(double salesAmount) {
|
||||
this.salesAmount = salesAmount;
|
||||
}
|
||||
public void setTaxRate(double taxRate) {
|
||||
this.taxRate = taxRate;
|
||||
}
|
||||
// constructor
|
||||
public RetailTax(double salesAmount, double taxRate) {
|
||||
this.salesAmount = salesAmount;
|
||||
this.taxRate = taxRate;
|
||||
}
|
||||
// method
|
||||
public double getTotal() {
|
||||
double taxTotal = 0.0;
|
||||
taxTotal = salesAmount * (taxRate * .01);
|
||||
taxTotal = taxTotal + salesAmount;
|
||||
return taxTotal;
|
||||
}
|
||||
// toString method
|
||||
@Override
|
||||
public String toString() {
|
||||
String str;
|
||||
str = String.format("Subtotal: $%.2f%nTax: $"
|
||||
+ "%.2f%nTotal: $%.2f",
|
||||
getSalesAmount(), getTaxRate(), getTotal());
|
||||
return str;
|
||||
}
|
||||
}
|
||||
20
dropbox07/src/dropbox07/TaxTest.java
Normal file
20
dropbox07/src/dropbox07/TaxTest.java
Normal file
@ -0,0 +1,20 @@
|
||||
package dropbox07;
|
||||
import java.util.Scanner;
|
||||
public class TaxTest {
|
||||
public static void main(String[] args) {
|
||||
Scanner input = new Scanner(System.in);
|
||||
// local variables to hold user input
|
||||
double salesAmount = 0.0;
|
||||
double taxRate = 0.0;
|
||||
// prompt the user for input
|
||||
System.out.println("Enter sales amount: ");
|
||||
salesAmount = input.nextDouble();
|
||||
System.out.println("Enter tax rate: ");
|
||||
taxRate = input.nextDouble();
|
||||
// create an object
|
||||
RetailTax retailtax = new RetailTax(salesAmount, taxRate);
|
||||
// display output
|
||||
System.out.println(retailtax);
|
||||
input.close();
|
||||
}
|
||||
}
|
||||
8
dropbox07/src/module-info.java
Normal file
8
dropbox07/src/module-info.java
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
module dropbox07 {
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user