Init
This commit is contained in:
commit
2411b5d4a4
14
Lab1/pom.xml
Normal file
14
Lab1/pom.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.calebfontenot.lab1</groupId>
|
||||||
|
<artifactId>Lab1</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
<exec.mainClass>com.calebfontenot.lab1.Lab1</exec.mainClass>
|
||||||
|
</properties>
|
||||||
|
</project>
|
18
Lab1/src/main/java/com/calebfontenot/lab1/Lab1.java
Normal file
18
Lab1/src/main/java/com/calebfontenot/lab1/Lab1.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.calebfontenot.lab1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Lab1 {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String message = "Hello World";
|
||||||
|
System.out.println(message);
|
||||||
|
}
|
||||||
|
}
|
14
Lab1CalebFontenot/pom.xml
Normal file
14
Lab1CalebFontenot/pom.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.calebfontenot.lab1calebfontenot</groupId>
|
||||||
|
<artifactId>Lab1CalebFontenot</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
<exec.mainClass>com.calebfontenot.lab1calebfontenot.Lab1CalebFontenot</exec.mainClass>
|
||||||
|
</properties>
|
||||||
|
</project>
|
15
Lab1CalebFontenot/src/main/java/ShowLogicErrors.java
Normal file
15
Lab1CalebFontenot/src/main/java/ShowLogicErrors.java
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class ShowLogicErrors {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Celsius 35 is Fahrenheit degree ");
|
||||||
|
System.out.println((9 / 5) * 35 + 32);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.calebfontenot.lab1calebfontenot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Lab1CalebFontenot {
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
// Create a string named message
|
||||||
|
String message = "Hello World!";
|
||||||
|
// Print our string
|
||||||
|
System.out.println(message);
|
||||||
|
}
|
||||||
|
}
|
15
Lab1CalebFontenot/src/main/java/test.java
Normal file
15
Lab1CalebFontenot/src/main/java/test.java
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class test {
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
System.out.println("Hello world 2");
|
||||||
|
}
|
||||||
|
}
|
BIN
Lab1CalebFontenot/target/Lab1CalebFontenot-1.0-SNAPSHOT.jar
Normal file
BIN
Lab1CalebFontenot/target/Lab1CalebFontenot-1.0-SNAPSHOT.jar
Normal file
Binary file not shown.
BIN
Lab1CalebFontenot/target/classes/NewClass.class
Normal file
BIN
Lab1CalebFontenot/target/classes/NewClass.class
Normal file
Binary file not shown.
BIN
Lab1CalebFontenot/target/classes/ShowLogicErrors.class
Normal file
BIN
Lab1CalebFontenot/target/classes/ShowLogicErrors.class
Normal file
Binary file not shown.
Binary file not shown.
BIN
Lab1CalebFontenot/target/classes/test.class
Normal file
BIN
Lab1CalebFontenot/target/classes/test.class
Normal file
Binary file not shown.
5
Lab1CalebFontenot/target/maven-archiver/pom.properties
Normal file
5
Lab1CalebFontenot/target/maven-archiver/pom.properties
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#Generated by Maven
|
||||||
|
#Tue Aug 16 11:12:43 CDT 2022
|
||||||
|
artifactId=Lab1CalebFontenot
|
||||||
|
groupId=com.calebfontenot.lab1calebfontenot
|
||||||
|
version=1.0-SNAPSHOT
|
@ -0,0 +1 @@
|
|||||||
|
com/calebfontenot/lab1calebfontenot/Lab1CalebFontenot.class
|
@ -0,0 +1 @@
|
|||||||
|
/home/caleb/NetBeansProjects/ADSV Java/Lab1CalebFontenot/src/main/java/com/calebfontenot/lab1calebfontenot/Lab1CalebFontenot.java
|
14
Lab2CalebFontenot/lab2CalebFontenot/pom.xml
Normal file
14
Lab2CalebFontenot/lab2CalebFontenot/pom.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.calebfontenot.lab2calebfontenot</groupId>
|
||||||
|
<artifactId>lab2CalebFontenot</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>18</maven.compiler.source>
|
||||||
|
<maven.compiler.target>18</maven.compiler.target>
|
||||||
|
<exec.mainClass>com.calebfontenot.lab2calebfontenot.Lab2CalebFontenot</exec.mainClass>
|
||||||
|
</properties>
|
||||||
|
</project>
|
@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class ComputeExpression {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.print("(10.5 + 2 * 3) / (45 – 3.5) = ");
|
||||||
|
System.out.println((10.5 + 2 * 3) / (45 - 3.5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class ShowLogicErrors {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.print("Celsius 35 is Fahrenheit degree ");
|
||||||
|
System.out.println((9.0 / 5) * 35 + 32);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
// ShowRuntimeErrors.java: Program contains runtime errors
|
||||||
|
public class ShowRuntimeErrors {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println(1 / 0);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class ShowSyntaxErrors {
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
System.out.println("Welcome to Java");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class WelcomeWithThreeMessages {
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
System.out.println("Programming is fun!");
|
||||||
|
System.out.println("Fundamentals First");
|
||||||
|
System.out.println("Problem Driven");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.calebfontenot.lab2calebfontenot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Lab2CalebFontenot {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello World!");
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
|||||||
|
com/calebfontenot/lab2calebfontenot/Lab2CalebFontenot.class
|
||||||
|
WelcomeWithThreeMessages.class
|
@ -0,0 +1,2 @@
|
|||||||
|
/home/caleb/NetBeansProjects/ADSV Java/Lab2CalebFontenot/lab2CalebFontenot/src/main/java/WelcomeWithThreeMessages.java
|
||||||
|
/home/caleb/NetBeansProjects/ADSV Java/Lab2CalebFontenot/lab2CalebFontenot/src/main/java/com/calebfontenot/lab2calebfontenot/Lab2CalebFontenot.java
|
14
Lab3CalebFontenot/pom.xml
Normal file
14
Lab3CalebFontenot/pom.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.calebfontenot.lab3calebfontenot</groupId>
|
||||||
|
<artifactId>Lab3CalebFontenot</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>18</maven.compiler.source>
|
||||||
|
<maven.compiler.target>18</maven.compiler.target>
|
||||||
|
<exec.mainClass>com.calebfontenot.lab3calebfontenot.Lab3CalebFontenot</exec.mainClass>
|
||||||
|
</properties>
|
||||||
|
</project>
|
20
Lab3CalebFontenot/src/main/java/Exercise01_04.java
Normal file
20
Lab3CalebFontenot/src/main/java/Exercise01_04.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Exercise01_04 {
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
System.out.println("a a^2 a^3");
|
||||||
|
System.out.println("1 1 1");
|
||||||
|
System.out.println("2 4 8");
|
||||||
|
System.out.println("3 9 27");
|
||||||
|
System.out.println("4 16 64");
|
||||||
|
}
|
||||||
|
}
|
16
Lab3CalebFontenot/src/main/java/Exercise01_06.java
Normal file
16
Lab3CalebFontenot/src/main/java/Exercise01_06.java
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Exercise01_06 {
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
System.out.println(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9);
|
||||||
|
}
|
||||||
|
}
|
16
Lab3CalebFontenot/src/main/java/Exercise01_07.java
Normal file
16
Lab3CalebFontenot/src/main/java/Exercise01_07.java
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Exercise01_07 {
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
System.out.println(4 * (1.0 - (1.0/3) + (1.0/5) - (1.0/7) + (1.0/9) - (1.0/11)));
|
||||||
|
System.out.println(4 * (1.0 - (1.0/3) + (1.0/5) - (1.0/7) + (1.0/9) - (1.0/11) + (1.0/13)));
|
||||||
|
}
|
||||||
|
}
|
25
Lab3CalebFontenot/src/main/java/Exercise01_11.java
Normal file
25
Lab3CalebFontenot/src/main/java/Exercise01_11.java
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Exercise01_11 {
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
double Population = 312032486.0;
|
||||||
|
for (int i = 1; i <= 5; i++) {
|
||||||
|
//One birth every 7 seconds
|
||||||
|
Population += ((60 * 60 * 24 * 365) / 7.0);
|
||||||
|
//One death every 13 seconds
|
||||||
|
Population -= ((60 * 60 * 24 * 365) / 13.0);
|
||||||
|
//One new immigrant every 45 seconds
|
||||||
|
Population += ((60 * 60 * 24 * 365) / 45.0);
|
||||||
|
System.out.println(Population);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.calebfontenot.lab3calebfontenot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Lab3CalebFontenot {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello World!");
|
||||||
|
}
|
||||||
|
}
|
BIN
Lab3CalebFontenot/target/classes/Exercise01_04.class
Normal file
BIN
Lab3CalebFontenot/target/classes/Exercise01_04.class
Normal file
Binary file not shown.
BIN
Lab3CalebFontenot/target/classes/Exercise01_06.class
Normal file
BIN
Lab3CalebFontenot/target/classes/Exercise01_06.class
Normal file
Binary file not shown.
BIN
Lab3CalebFontenot/target/classes/Exercise01_07.class
Normal file
BIN
Lab3CalebFontenot/target/classes/Exercise01_07.class
Normal file
Binary file not shown.
BIN
Lab3CalebFontenot/target/classes/Exercise01_11.class
Normal file
BIN
Lab3CalebFontenot/target/classes/Exercise01_11.class
Normal file
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
|||||||
|
com/calebfontenot/lab3calebfontenot/Lab3CalebFontenot.class
|
||||||
|
Exercise01_04.class
|
@ -0,0 +1,2 @@
|
|||||||
|
/home/caleb/NetBeansProjects/ADSV Java/Lab3CalebFontenot/src/main/java/Exercise01_04.java
|
||||||
|
/home/caleb/NetBeansProjects/ADSV Java/Lab3CalebFontenot/src/main/java/com/calebfontenot/lab3calebfontenot/Lab3CalebFontenot.java
|
14
Lab3_1_CalebFontenot/pom.xml
Normal file
14
Lab3_1_CalebFontenot/pom.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.calebfontenot.lab3_1_calebfontenot</groupId>
|
||||||
|
<artifactId>Lab3_1_CalebFontenot</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>18</maven.compiler.source>
|
||||||
|
<maven.compiler.target>18</maven.compiler.target>
|
||||||
|
<exec.mainClass>com.calebfontenot.lab3_1_calebfontenot.Lab3_1_CalebFontenot</exec.mainClass>
|
||||||
|
</properties>
|
||||||
|
</project>
|
@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.calebfontenot.lab3_1_calebfontenot;
|
||||||
|
import java.util.Scanner;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Lab3 {
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
// Create a scanner object
|
||||||
|
Scanner input = new Scanner(System.in);
|
||||||
|
|
||||||
|
// Prompt for hight in feet
|
||||||
|
System.out.print("Enter the height (feet): ");
|
||||||
|
double height;
|
||||||
|
height = input.nextDouble();
|
||||||
|
|
||||||
|
// Prompt for width in feet
|
||||||
|
System.out.print("Enter the width (feet):");
|
||||||
|
double width;
|
||||||
|
width = input.nextDouble();
|
||||||
|
|
||||||
|
// Calculate the area
|
||||||
|
double area;
|
||||||
|
area = height * width;
|
||||||
|
// Print area calculated
|
||||||
|
System.out.println("Calculated area is "+area);
|
||||||
|
//create constants
|
||||||
|
final double GALLONS_PER_SQUARE_FEET = 150.0;
|
||||||
|
|
||||||
|
// calculate the gallons
|
||||||
|
double gallons;
|
||||||
|
gallons = area/GALLONS_PER_SQUARE_FEET;
|
||||||
|
//calculate the number of gallons needed to paint the wall
|
||||||
|
System.out.println("The amount of paint is " + gallons +" gallons.");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.calebfontenot.lab3_1_calebfontenot;
|
||||||
|
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class MilesToKilometers {
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
double miles;
|
||||||
|
double km;
|
||||||
|
Scanner scanner = new Scanner(System.in);
|
||||||
|
|
||||||
|
//> 1. Prompt the user to enter the number of miles
|
||||||
|
System.out.println("Please enter miles to convert into kilometers");
|
||||||
|
//> 2. Read the miles and store it into a variable
|
||||||
|
miles = scanner.nextDouble();
|
||||||
|
//> 3. Calculate the KM from the entered miles
|
||||||
|
km = miles * 1.67;
|
||||||
|
//> 4. Display the result
|
||||||
|
System.out.println("You entered "+miles+" miles which is "+km+" kilometers");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.calebfontenot.lab3_1_calebfontenot;
|
||||||
|
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class RunwayLength {
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
|
||||||
|
//Define data objects
|
||||||
|
double length;
|
||||||
|
double acceleration;
|
||||||
|
double velocity;
|
||||||
|
|
||||||
|
//Create scanner
|
||||||
|
Scanner input = new Scanner(System.in);
|
||||||
|
|
||||||
|
//Prompt for input
|
||||||
|
System.out.print("Enter velocity: ");
|
||||||
|
velocity = input.nextDouble();
|
||||||
|
System.out.print("Enter acceleration: ");
|
||||||
|
acceleration = input.nextDouble();
|
||||||
|
|
||||||
|
//Calculate
|
||||||
|
length = Math.pow(velocity, 2) / (2 * acceleration);
|
||||||
|
|
||||||
|
//Print calculation
|
||||||
|
System.out.println("The minimum runway length for this airplane is "+length);
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
|||||||
|
com/calebfontenot/lab3_1_calebfontenot/MilesToKilometers.class
|
||||||
|
com/calebfontenot/lab3_1_calebfontenot/Lab3_1_CalebFontenot.class
|
@ -0,0 +1,2 @@
|
|||||||
|
/home/caleb/NetBeansProjects/ADSV Java/Lab3_1_CalebFontenot/src/main/java/com/calebfontenot/lab3_1_calebfontenot/Lab3_1_CalebFontenot.java
|
||||||
|
/home/caleb/NetBeansProjects/ADSV Java/Lab3_1_CalebFontenot/src/main/java/com/calebfontenot/lab3_1_calebfontenot/MilesToKilometers.java
|
14
Lab4_1/pom.xml
Normal file
14
Lab4_1/pom.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.calebfontenot.lab4_1</groupId>
|
||||||
|
<artifactId>Lab4_1</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>18</maven.compiler.source>
|
||||||
|
<maven.compiler.target>18</maven.compiler.target>
|
||||||
|
<exec.mainClass>com.calebfontenot.lab4_1.Lab4_1</exec.mainClass>
|
||||||
|
</properties>
|
||||||
|
</project>
|
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.calebfontenot.lab4_1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
public class DisplayTime {
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
Scanner input = new Scanner(System.in);
|
||||||
|
// Prompt the user for input
|
||||||
|
System.out.print("Enter an integer for seconds: ");
|
||||||
|
int seconds = input.nextInt();
|
||||||
|
|
||||||
|
int minutes = seconds / 60; // Find minutes in seconds
|
||||||
|
int remainingSeconds = seconds % 60; // Seconds remaining
|
||||||
|
System.out.println(seconds + " seconds is " + minutes
|
||||||
|
+ " minutes and " + remainingSeconds + " seconds");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
17
Lab4_1/src/main/java/com/calebfontenot/lab4_1/Lab4_1.java
Normal file
17
Lab4_1/src/main/java/com/calebfontenot/lab4_1/Lab4_1.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.calebfontenot.lab4_1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Lab4_1 {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello World!");
|
||||||
|
}
|
||||||
|
}
|
24
Lab4_1/src/main/java/com/calebfontenot/lab4_1/SalesTax.java
Normal file
24
Lab4_1/src/main/java/com/calebfontenot/lab4_1/SalesTax.java
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.calebfontenot.lab4_1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
public class SalesTax {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Scanner input = new Scanner(System.in);
|
||||||
|
|
||||||
|
System.out.print("Enter purchase amount: ");
|
||||||
|
double purchaseAmount = input.nextDouble();
|
||||||
|
|
||||||
|
double tax = purchaseAmount * 0.06;
|
||||||
|
System.out.println("Sales tax is " + (int)(tax * 100) / 100.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
0
Lab4_1/target/classes/.netbeans_automatic_build
Normal file
0
Lab4_1/target/classes/.netbeans_automatic_build
Normal file
BIN
Lab4_1/target/classes/com/calebfontenot/lab4_1/DisplayTime.class
Normal file
BIN
Lab4_1/target/classes/com/calebfontenot/lab4_1/DisplayTime.class
Normal file
Binary file not shown.
BIN
Lab4_1/target/classes/com/calebfontenot/lab4_1/Lab4_1.class
Normal file
BIN
Lab4_1/target/classes/com/calebfontenot/lab4_1/Lab4_1.class
Normal file
Binary file not shown.
BIN
Lab4_1/target/classes/com/calebfontenot/lab4_1/SalesTax.class
Normal file
BIN
Lab4_1/target/classes/com/calebfontenot/lab4_1/SalesTax.class
Normal file
Binary file not shown.
@ -0,0 +1,2 @@
|
|||||||
|
com/calebfontenot/lab4_1/DisplayTime.class
|
||||||
|
com/calebfontenot/lab4_1/Lab4_1.class
|
@ -0,0 +1,2 @@
|
|||||||
|
/home/caleb/NetBeansProjects/ADSV Java/Lab4_1/src/main/java/com/calebfontenot/lab4_1/DisplayTime.java
|
||||||
|
/home/caleb/NetBeansProjects/ADSV Java/Lab4_1/src/main/java/com/calebfontenot/lab4_1/Lab4_1.java
|
14
MP1/pom.xml
Normal file
14
MP1/pom.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.calebfontenot.mp1</groupId>
|
||||||
|
<artifactId>MP1</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>18</maven.compiler.source>
|
||||||
|
<maven.compiler.target>18</maven.compiler.target>
|
||||||
|
<exec.mainClass>com.calebfontenot.mp1.MP1</exec.mainClass>
|
||||||
|
</properties>
|
||||||
|
</project>
|
17
MP1/src/main/java/com/calebfontenot/mp1/MP1.java
Normal file
17
MP1/src/main/java/com/calebfontenot/mp1/MP1.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.calebfontenot.mp1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class MP1 {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello World!");
|
||||||
|
}
|
||||||
|
}
|
14
MP1_CalebFontenot/pom.xml
Normal file
14
MP1_CalebFontenot/pom.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.calebfontenot.mp1_calebfontenot</groupId>
|
||||||
|
<artifactId>MP1_CalebFontenot</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>18</maven.compiler.source>
|
||||||
|
<maven.compiler.target>18</maven.compiler.target>
|
||||||
|
<exec.mainClass>com.calebfontenot.mp1_calebfontenot.MP1_CalebFontenot</exec.mainClass>
|
||||||
|
</properties>
|
||||||
|
</project>
|
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.calebfontenot.mp1_calebfontenot;
|
||||||
|
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Cylinder {
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
Scanner input = new Scanner(System.in);
|
||||||
|
|
||||||
|
// Enter radius of the cylinder
|
||||||
|
System.out.print("Enter the radius and length of a cylinder: ");
|
||||||
|
double radius = input.nextDouble();
|
||||||
|
double length = input.nextDouble();
|
||||||
|
|
||||||
|
// Compute area and volume
|
||||||
|
double area = radius * radius * 3.14159;
|
||||||
|
double volume = area * length;
|
||||||
|
|
||||||
|
// Display result
|
||||||
|
System.out.println("The area is " + area);
|
||||||
|
System.out.println("The volume of the cylinder is " + volume);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.calebfontenot.mp1_calebfontenot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class MP1_CalebFontenot {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello World!");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.calebfontenot.mp1_calebfontenot;
|
||||||
|
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class NumberOfYears {
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
// Define vars
|
||||||
|
double NumberOfMinutes;
|
||||||
|
double NumberOfYears;
|
||||||
|
double NumberOfDays;
|
||||||
|
double NumberOfHours;
|
||||||
|
|
||||||
|
// Create Scanner
|
||||||
|
Scanner input = new Scanner(System.in);
|
||||||
|
|
||||||
|
// Prompt for input
|
||||||
|
System.out.print("Enter the number of minutes: ");
|
||||||
|
NumberOfMinutes = input.nextDouble();
|
||||||
|
|
||||||
|
// Calculate
|
||||||
|
NumberOfHours = (NumberOfMinutes / 60);
|
||||||
|
NumberOfDays = (NumberOfHours / 24);
|
||||||
|
NumberOfYears = (NumberOfDays / 365);
|
||||||
|
|
||||||
|
|
||||||
|
// Print output
|
||||||
|
System.out.println((int) NumberOfMinutes+" minutes is approx. :");
|
||||||
|
System.out.println((int) NumberOfHours+" hours,");
|
||||||
|
System.out.println((int) NumberOfDays+" days,");
|
||||||
|
System.out.println((int) NumberOfYears+" years.");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.calebfontenot.mp1_calebfontenot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class SumOfDigits {
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
java.util.Scanner input = new java.util.Scanner(System.in);
|
||||||
|
//> Read a number
|
||||||
|
System.out.print("Inter an integer between 0 and 1000: ");
|
||||||
|
int number = input.nextInt();
|
||||||
|
|
||||||
|
//> Find all digits in number
|
||||||
|
int lastDigit = number % 10;
|
||||||
|
int remainingNumber = number / 10;
|
||||||
|
int secondLastDigit = remainingNumber % 10;
|
||||||
|
remainingNumber = remainingNumber / 10;
|
||||||
|
int thirdLastDigit = remainingNumber % 10;
|
||||||
|
|
||||||
|
//> Obtain the sum of all digits
|
||||||
|
int sum = lastDigit + secondLastDigit + thirdLastDigit;
|
||||||
|
|
||||||
|
//>Display results
|
||||||
|
System.out.println("The sum of all digits in "+ number
|
||||||
|
+ " is " + sum);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.calebfontenot.mp1_calebfontenot;
|
||||||
|
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author caleb
|
||||||
|
*/
|
||||||
|
public class Total {
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
// Define variables:
|
||||||
|
double subtotal;
|
||||||
|
double gratuity;
|
||||||
|
double total;
|
||||||
|
|
||||||
|
// Get subtotal and gratuity rate
|
||||||
|
// Setup Scanner
|
||||||
|
Scanner input = new Scanner(System.in);
|
||||||
|
|
||||||
|
// Get vars
|
||||||
|
System.out.print("Enter subtotal and gratuity rate: ");
|
||||||
|
subtotal = input.nextDouble();
|
||||||
|
gratuity = input.nextDouble();
|
||||||
|
|
||||||
|
// Calculate
|
||||||
|
// Convert gratuity into a decimal because its a percentage:
|
||||||
|
gratuity = (gratuity / 10); //* 10;
|
||||||
|
|
||||||
|
total = (subtotal + gratuity);
|
||||||
|
|
||||||
|
// Print result
|
||||||
|
System.out.println("The gratuity is $"+gratuity+" and the total is $"+total);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
|||||||
|
com/calebfontenot/mp1_calebfontenot/MP1_CalebFontenot.class
|
||||||
|
com/calebfontenot/mp1_calebfontenot/Cylinder.class
|
@ -0,0 +1,2 @@
|
|||||||
|
/home/caleb/NetBeansProjects/ADSV Java/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/Cylinder.java
|
||||||
|
/home/caleb/NetBeansProjects/ADSV Java/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/MP1_CalebFontenot.java
|
Loading…
x
Reference in New Issue
Block a user