new dropbox stuff

This commit is contained in:
Scott 2025-09-13 21:46:21 -07:00
parent c3eca41868
commit e9eaccab4d
41 changed files with 555 additions and 0 deletions

10
drobbox08/.classpath Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" 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>

1
drobbox08/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/bin/

17
drobbox08/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>drobbox08</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>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View 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

View File

@ -0,0 +1,65 @@
/**
* Assignment 8
* Course: CISS238
* Student: Scott Steely
* Date: Sep 13, 2025
*/
package dropbox08;
public class Triangle {
// fields
private int side1;
private int side2;
private int side3;
// accessors
public int getSide1() {
return side1;
}
public int getSide2() {
return side2;
}
public int getSide3() {
return side3;
}
// mutators
public void setSide1(int side1) {
this.side1 = side1;
}
public void setSide2(int side2) {
this.side2 = side2;
}
public void setSide3(int side3) {
this.side3 = side3;
}
// constructor
public Triangle(int side1, int side2, int side3) {
this.side1 = side1;
this.side2 = side2;
this.side3 = side3;
}
// method
public boolean isTriangle() {
boolean triangle = false;
if(getSide1() + getSide2() > getSide3()
&& getSide2() + getSide3() > getSide1()
&& getSide3() + getSide1() > getSide2()) {
triangle = true;
}
return triangle;
}
// toString
@Override
public String toString() {
String str;
str = String.format("%d, %d, and %d %s",
getSide1(), getSide2(), getSide3(),
isTriangle()?
"can make three sides of a triangle."
:"cannot make three sides of a triangle.");
return str;
}
}

View File

@ -0,0 +1,32 @@
/**
* Assignment 8
* Course: CISS238
* Student: Scott Steely
* Date: Sep 13, 2025
*/
package dropbox08;
import java.util.Scanner;
public class TriangleTest {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
// declare three variables
int side1=0; int side2=0; int side3=0;
// prompt the user for input
System.out.println("Enter length for side 1: ");
side1 = input.nextInt();
System.out.println("Enter length for side 2: ");
side2 = input.nextInt();
System.out.println("Enter length for side 3: ");
side3 = input.nextInt();
// create an object of the Triangle class
Triangle triangle = new Triangle(side1, side2, side3);
// display
System.out.println(triangle);
input.close();
}
}

View File

@ -0,0 +1,8 @@
/**
*
*/
/**
*
*/
module dropbox08 {
}

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,14 @@
/**
* Assignment 6
* Course: CISS238
* Student: Scott Steely
* Date: Sep 13, 2025
*/
package dropbox06; package dropbox06;
public class Trip { public class Trip {
// fields // fields

View File

@ -1,3 +1,14 @@
/**
* Assignment 6
* Course: CISS238
* Student: Scott Steely
* Date: Sep 13, 2025
*/
package dropbox06; package dropbox06;
import java.util.Scanner; import java.util.Scanner;
public class TripTest { public class TripTest {

View File

@ -1,3 +1,14 @@
/**
* Assignment 7
* Course: CISS238
* Student: Scott Steely
* Date: Sep 13, 2025
*/
package dropbox07; package dropbox07;
public class RetailTax { public class RetailTax {

View File

@ -1,3 +1,14 @@
/**
* Assignment 7
* Course: CISS238
* Student: Scott Steely
* Date: Sep 13, 2025
*/
package dropbox07; package dropbox07;
import java.util.Scanner; import java.util.Scanner;
public class TaxTest { public class TaxTest {

17
dropbox08/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>dropbox08</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>

17
dropbox08/bin/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>dropbox08</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>

10
dropbox09/.classpath Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path=""/>
<classpathentry kind="output" path=""/>
</classpath>

17
dropbox09/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>dropbox09</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>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

2
dropbox09/dropbox09/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/RightTriangle.class
/RightTriangleTest.class

View File

@ -0,0 +1,66 @@
/**
* Assignment 9
* Course: CISS238
* Student: Scott Steely
* Date: Sep 13, 2025
*/
package dropbox09;
public class RightTriangle {
// fields
private int side1;
private int side2;
private int side3;
// accessors
public int getSide1() {
return side1;
}
public int getSide2() {
return side2;
}
public int getSide3() {
return side3;
}
// mutators
public void setSide1(int side1) {
this.side1 = side1;
}
public void setSide2(int side2) {
this.side2 = side2;
}
public void setSide3(int side3) {
this.side3 = side3;
}
// constructor
public RightTriangle(int side1, int side2, int side3) {
this.side1 = side1;
this.side2 = side2;
this.side3 = side3;
}
// method
public boolean isRightTriangle() {
boolean right_triangle = false;
if ((getSide1() * getSide1()) + (getSide2() * getSide2()) - (getSide3() * getSide3()) == 0
|| (getSide3() * getSide3()) + (getSide1() * getSide1()) - (getSide2() * getSide2()) == 0
|| (getSide3() * getSide3()) + (getSide2() * getSide2()) - (getSide1() * getSide1()) == 0) {
right_triangle = true;
}
return right_triangle;
}
// toString
@Override
public String toString() {
String str;
str = String.format("%d, %d, and %d %s",
getSide1(), getSide2(), getSide3(),
isRightTriangle()?
"can make a right triangle."
:"cannot make a right triangle.");
return str;
}
}

View File

@ -0,0 +1,33 @@
/**
* Assignment 9
* Course: CISS238
* Student: Scott Steely
* Date: Sep 13, 2025
*/
package dropbox09;
import java.util.Scanner;
public class RightTriangleTest {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
// declare three variables
int side1=0; int side2=0; int side3=0;
// prompt the user for input
System.out.println("Enter length for side 1: ");
side1 = input.nextInt();
System.out.println("Enter length for side 2: ");
side2 = input.nextInt();
System.out.println("Enter length for side 3: ");
side3 = input.nextInt();
// create an object of the Triangle class
RightTriangle triangle = new RightTriangle(side1, side2, side3);
// display
System.out.println(triangle);
input.close();
}
}

10
dropbox81/.classpath Normal file
View 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
dropbox81/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>dropbox81</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>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View 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

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,54 @@
package dropbox08;
public class Triangle {
// fields
private int side1;
private int side2;
private int side3;
// accessors
public int getSide1() {
return side1;
}
public int getSide2() {
return side2;
}
public int getSide3() {
return side3;
}
// mutators
public void setSide1(int side1) {
this.side1 = side1;
}
public void setSide2(int side2) {
this.side2 = side2;
}
public void setSide3(int side3) {
this.side3 = side3;
}
// constructor
public Triangle(int side1, int side2, int side3) {
this.side1 = side1;
this.side2 = side2;
this.side3 = side3;
}
// method
public boolean isTriangle() {
boolean triangle = false;
if(getSide1() + getSide2() > getSide3()
&& getSide2() + getSide3() > getSide1()
&& getSide3() + getSide1() > getSide2()) {
triangle = true;
}
return triangle;
}
// toString
@Override
public String toString() {
String str;
str = String.format("%d, %d, and %d %s",
getSide1(), getSide2(), getSide3(),
isTriangle()?
"can make three sides of a triangle."
:"cannot make three sides of a triangle.");
return str;
}
}

View File

@ -0,0 +1,21 @@
package dropbox08;
import java.util.Scanner;
public class TriangleTest {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
// declare three variables
int side1=0; int side2=0; int side3=0;
// prompt the user for input
System.out.println("Enter length for side 1: ");
side1 = input.nextInt();
System.out.println("Enter length for side 2: ");
side2 = input.nextInt();
System.out.println("Enter length for side 3: ");
side3 = input.nextInt();
// create an object of the Triangle class
Triangle triangle = new Triangle(side1, side2, side3);
// display
System.out.println(triangle);
input.close();
}
}

View File

@ -0,0 +1,8 @@
/**
*
*/
/**
*
*/
module dropbox07 {
}

10
test2/.classpath Normal file
View 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-24">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

1
test2/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/bin/

17
test2/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>test2</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>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=24
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=24
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=24

View File

@ -0,0 +1,8 @@
/**
*
*/
/**
*
*/
module test2 {
}

10
test3/.classpath Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path=""/>
<classpathentry kind="output" path=""/>
</classpath>

17
test3/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>test3</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>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8