diff --git a/.gitignore b/.gitignore
index 874c355..8b990d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -153,3 +153,6 @@
/Semester 3/Assignments/MP2FX_Stelly/nbproject/private/
/Semester 3/Assignments/DonorProject/nbproject/private/
/Semester 3/Assignments/DonorProject/build/
+/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/private/
+/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/dist/
+/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/build/
diff --git a/Semester 3/Assignments/MP2-chapter4_CalebFontenot/nbproject/project.properties b/Semester 3/Assignments/MP2-chapter4_CalebFontenot/nbproject/project.properties
index 830b97a..3563b88 100644
--- a/Semester 3/Assignments/MP2-chapter4_CalebFontenot/nbproject/project.properties
+++ b/Semester 3/Assignments/MP2-chapter4_CalebFontenot/nbproject/project.properties
@@ -37,7 +37,8 @@ includes=**
# Non-JavaFX jar file creation is deactivated in JavaFX 2.0+ projects
jar.archive.disabled=true
jar.compress=false
-javac.classpath=
+javac.classpath=\
+ ${libs.JavaFX20.classpath}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
@@ -46,8 +47,8 @@ javac.modulepath=
javac.processormodulepath=
javac.processorpath=\
${javac.classpath}
-javac.source=1.8
-javac.target=1.8
+javac.source=20
+javac.target=20
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/build.xml b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/build.xml
new file mode 100644
index 0000000..f1788d5
--- /dev/null
+++ b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/build.xml
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+ Builds, tests, and runs the project MP2-chapter4_Java20_CalebFontenot.
+
+
+
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/manifest.mf b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/manifest.mf
new file mode 100644
index 0000000..328e8e5
--- /dev/null
+++ b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/manifest.mf
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/build-impl.xml b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/build-impl.xml
new file mode 100644
index 0000000..71b035b
--- /dev/null
+++ b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/build-impl.xml
@@ -0,0 +1,1771 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set src.dir
+ Must set test.src.dir
+ Must set build.dir
+ Must set dist.dir
+ Must set build.classes.dir
+ Must set dist.javadoc.dir
+ Must set build.test.classes.dir
+ Must set build.test.results.dir
+ Must set build.classes.excludes
+ Must set dist.jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No tests executed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set JVM to use for profiling in profiler.info.jvm
+ Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
+
+ java -jar "${dist.jar.resolved}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must set fix.includes
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set profile.class
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+ Some tests failed; see details above.
+
+
+
+ Must select some files in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+ Must select one file in the IDE or set test.class
+
+
+
+ Must select one file in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/genfiles.properties b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/genfiles.properties
new file mode 100644
index 0000000..d3bda0d
--- /dev/null
+++ b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=3b569e2a
+build.xml.script.CRC32=413afed0
+build.xml.stylesheet.CRC32=f85dc8f2@1.107.0.48
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=3b569e2a
+nbproject/build-impl.xml.script.CRC32=80ea1a25
+nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.107.0.48
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/project.properties b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/project.properties
new file mode 100644
index 0000000..18705b8
--- /dev/null
+++ b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/project.properties
@@ -0,0 +1,114 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.processors.list=
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+application.title=MP2-chapter4_Java20_CalebFontenot
+application.vendor=caleb
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+ ${run.classpath}
+debug.modulepath=\
+ ${run.modulepath}
+debug.test.classpath=\
+ ${run.test.classpath}
+debug.test.modulepath=\
+ ${run.test.modulepath}
+# Files in build.classes.dir which should be excluded from distribution jar
+dist.archive.excludes=
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/MP2-chapter4_Java20_CalebFontenot.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+dist.jlink.dir=${dist.dir}/jlink
+dist.jlink.output=${dist.jlink.dir}/MP2-chapter4_Java20_CalebFontenot
+endorsed.classpath=
+excludes=
+includes=**
+jar.archive.disabled=${jnlp.enabled}
+jar.compress=false
+jar.index=${jnlp.enabled}
+javac.classpath=\
+ ${libs.JavaFX17.classpath}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.external.vm=true
+javac.modulepath=
+javac.processormodulepath=
+javac.processorpath=\
+ ${javac.classpath}
+javac.source=17
+javac.target=17
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.JavaFX17.classpath}
+javac.test.modulepath=\
+ ${javac.modulepath}
+javac.test.processorpath=\
+ ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.html5=false
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+# The jlink additional root modules to resolve
+jlink.additionalmodules=
+# The jlink additional command line parameters
+jlink.additionalparam=
+jlink.launcher=true
+jlink.launcher.name=MP2-chapter4_Java20_CalebFontenot
+jnlp.codebase.type=no.codebase
+jnlp.descriptor=application
+jnlp.enabled=false
+jnlp.mixed.code=default
+jnlp.offline-allowed=false
+jnlp.signed=false
+jnlp.signing=
+jnlp.signing.alias=
+jnlp.signing.keystore=
+main.class=MP2_chapter4_CalebFontenot.BallControl
+# Optional override of default Application-Library-Allowable-Codebase attribute identifying the locations where your signed RIA is expected to be found.
+manifest.custom.application.library.allowable.codebase=
+# Optional override of default Caller-Allowable-Codebase attribute identifying the domains from which JavaScript code can make calls to your RIA without security prompts.
+manifest.custom.caller.allowable.codebase=
+# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed
+manifest.custom.codebase=
+# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions)
+manifest.custom.permissions=
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+mkdist.disabled=false
+platform.active=default_platform
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+run.modulepath=\
+ ${javac.modulepath}
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+run.test.modulepath=\
+ ${javac.test.modulepath}
+source.encoding=UTF-8
+src.dir=src
+test.src.dir=test
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/project.xml b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/project.xml
new file mode 100644
index 0000000..4d1f72c
--- /dev/null
+++ b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/nbproject/project.xml
@@ -0,0 +1,15 @@
+
+
+ org.netbeans.modules.java.j2seproject
+
+
+ MP2-chapter4_Java20_CalebFontenot
+
+
+
+
+
+
+
+
+
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/bgm/Caleb Fontenot - Blips.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/bgm/Caleb Fontenot - Blips.wav
new file mode 100644
index 0000000..a0c299c
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/bgm/Caleb Fontenot - Blips.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/bgm/Caleb Fontenot - DEAL WITH IT.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/bgm/Caleb Fontenot - DEAL WITH IT.wav
new file mode 100644
index 0000000..ea93eb8
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/bgm/Caleb Fontenot - DEAL WITH IT.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/bgm/Caleb Fontenot - Tomodachi Moment.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/bgm/Caleb Fontenot - Tomodachi Moment.wav
new file mode 100644
index 0000000..bcf0cb5
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/bgm/Caleb Fontenot - Tomodachi Moment.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0000.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0000.wav
new file mode 100644
index 0000000..d888223
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0000.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0001.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0001.wav
new file mode 100644
index 0000000..c718aae
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0001.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0002.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0002.wav
new file mode 100644
index 0000000..5f9e55e
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0002.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0003.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0003.wav
new file mode 100644
index 0000000..a9f6ffe
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0003.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0004.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0004.wav
new file mode 100644
index 0000000..e51b0bb
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0004.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0005.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0005.wav
new file mode 100644
index 0000000..9a4ac42
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0005.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0007.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0007.wav
new file mode 100644
index 0000000..6a092d3
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0007.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0009.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0009.wav
new file mode 100644
index 0000000..2ad13cd
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0009.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0010.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0010.wav
new file mode 100644
index 0000000..0c66f12
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0010.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0012.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0012.wav
new file mode 100644
index 0000000..9b68ba4
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0012.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0014.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0014.wav
new file mode 100644
index 0000000..3c7226d
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0014.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0016.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0016.wav
new file mode 100644
index 0000000..22742d6
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0016.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0017.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0017.wav
new file mode 100644
index 0000000..6251b90
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0017.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0018.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0018.wav
new file mode 100644
index 0000000..5388a13
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0018.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0019.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0019.wav
new file mode 100644
index 0000000..85fb935
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0019.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0020.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0020.wav
new file mode 100644
index 0000000..c3ec3c2
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0020.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0021.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0021.wav
new file mode 100644
index 0000000..0803b10
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0021.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0022.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0022.wav
new file mode 100644
index 0000000..fb69172
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0022.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0023.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0023.wav
new file mode 100644
index 0000000..a2b2d6a
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0023.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0024.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0024.wav
new file mode 100644
index 0000000..9e7c30f
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0024.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0025.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0025.wav
new file mode 100644
index 0000000..6cfb8e4
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0025.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0026.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0026.wav
new file mode 100644
index 0000000..4968470
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0026.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0027.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0027.wav
new file mode 100644
index 0000000..294843f
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0027.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0028.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0028.wav
new file mode 100644
index 0000000..702d016
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0028.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0029.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0029.wav
new file mode 100644
index 0000000..cddc2f7
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0029.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0030.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0030.wav
new file mode 100644
index 0000000..58dc8a4
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0030.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0031.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0031.wav
new file mode 100644
index 0000000..89ee426
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0031.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0032.wav b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0032.wav
new file mode 100644
index 0000000..ed8586d
Binary files /dev/null and b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/sound/sfx/Sample_0032.wav differ
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/src/MP2_chapter4_CalebFontenot/BallControl.java b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/src/MP2_chapter4_CalebFontenot/BallControl.java
new file mode 100644
index 0000000..e17348b
--- /dev/null
+++ b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/src/MP2_chapter4_CalebFontenot/BallControl.java
@@ -0,0 +1,90 @@
+/*
+ * 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 MP2_chapter4_CalebFontenot;
+
+
+import javafx.application.Application;
+import javafx.event.EventHandler;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.input.KeyCode;
+import javafx.scene.input.MouseEvent;
+import javafx.stage.Stage;
+
+/**
+ *
+ * @author caleb
+ */
+public class BallControl extends Application {
+
+ private boolean mouseFocus = false;
+ private int racketPosition = 0;
+
+ @Override
+ public void start(Stage primaryStage) throws Exception
+ {
+ //Parent root = FXMLLoader.load(getClass()).getResource("hellofx.fxml");
+ BouncingBall bouncingBall = new BouncingBall();
+ // Create a scene and place it in the stage
+ Scene scene = new Scene(bouncingBall, 800, 600);
+ primaryStage.setTitle("Bouncing Ball Control");
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ bouncingBall.requestFocus();
+ bouncingBall.showInfoLabel();
+
+ bouncingBall.setOnMouseEntered(e
+ -> {
+ mouseFocus = true;
+ bouncingBall.hideInfoLabel();
+ bouncingBall.play();
+ });
+
+ bouncingBall.setOnMouseExited(e -> {
+ mouseFocus = false;
+ });
+ bouncingBall.setOnMouseMoved(new EventHandler() {
+ @Override
+ public void handle(MouseEvent event)
+ {
+ double mouseX = event.getSceneX() - (bouncingBall.RACKET_LENGTH / 2); // set relative to center of racket
+ bouncingBall.moveRacket(mouseX);
+ }
+
+ });
+
+ // Increase and decrease animation
+ bouncingBall.setOnKeyPressed(e
+ -> {
+ if (e.getCode() == KeyCode.LEFT && mouseFocus == false) {
+ bouncingBall.hideInfoLabel();
+ if (racketPosition > 0) {
+ racketPosition = racketPosition - 30;
+ }
+ bouncingBall.moveRacket(racketPosition);
+ }
+ if (e.getCode() == KeyCode.RIGHT && mouseFocus == false) {
+ bouncingBall.hideInfoLabel();
+ if (racketPosition < bouncingBall.getWidth()) {
+ racketPosition = racketPosition + 30;
+ }
+ bouncingBall.moveRacket(racketPosition);
+ }
+ if (e.getCode() == KeyCode.UP) {
+ bouncingBall.increaseSpeed();
+ } else if (e.getCode() == KeyCode.DOWN) {
+ bouncingBall.decreaseSpeed();
+ }
+
+ }
+ );
+ }
+
+ public static void main(String[] args)
+ {
+ launch(args);
+ }
+}
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/src/MP2_chapter4_CalebFontenot/BouncingBall.java b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/src/MP2_chapter4_CalebFontenot/BouncingBall.java
new file mode 100644
index 0000000..942d040
--- /dev/null
+++ b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/src/MP2_chapter4_CalebFontenot/BouncingBall.java
@@ -0,0 +1,258 @@
+/*
+ * 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 MP2_chapter4_CalebFontenot;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import javafx.animation.KeyFrame;
+import javafx.animation.Timeline;
+import javafx.beans.property.DoubleProperty;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.scene.control.Button;
+import javafx.scene.control.Label;
+import javafx.scene.layout.GridPane;
+import javafx.scene.layout.Pane;
+import javafx.scene.media.Media;
+import javafx.scene.media.MediaPlayer;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.Circle;
+import javafx.scene.shape.Rectangle;
+import javafx.util.Duration;
+
+
+/**
+ *
+ * @author caleb
+ */
+public class BouncingBall extends Pane {
+
+ private List mediaPlayers = new ArrayList<>();
+ GridPane textPane = new GridPane();
+ private String currentlyPlaying;
+ private final int COLLISION_COOLDOWN = 20;
+ private long timeSinceLastCollisionEvent = 0;
+ final double RACKET_LENGTH = 100;
+ final double radius = 20;
+ private double x = radius, y = radius;
+ private double dx = 1, dy = 1;
+ private Circle circle = new Circle(x, y, radius);
+ private Rectangle racket = new Rectangle(RACKET_LENGTH, 20);
+ private Label infoLabel = new Label("Your mouse cursor must be inside the bounds of the window to play!");
+ private Label racketTime = new Label();
+ private Label ballCords = new Label();
+ private Label playerScoreLabel = new Label("Player Score: 0");
+ private Label computerScoreLabel = new Label("Computer Score: 0");
+ private Label nowPlaying = new Label();
+ private Button restartBgm = new Button("Restart BGM");
+ private Label jvmVersion = new Label("Java version: Java " + System.getProperty("java.version"));
+
+ private Timeline animation;
+
+ private int computerScore, playerScore = 0;
+
+ public BouncingBall() {
+ restartBgm.setOnMouseClicked(e -> {
+ playSound("bgm");
+ });
+ circle.setFill(Color.RED); // Set ball color
+ racket.setFill(Color.BLUE);
+ textPane.add(racketTime, 0, 0);
+ textPane.add(ballCords, 0, 1);
+ textPane.add(playerScoreLabel, 0, 2);
+ textPane.add(computerScoreLabel, 0, 3);
+ textPane.add(nowPlaying, 0, 4);
+ textPane.add(jvmVersion, 0, 5);
+ textPane.add(restartBgm, 0, 6);
+ getChildren().addAll(circle, racket, textPane); // Place a ball into this pane
+ racket.relocate(0, 580);
+ playSound("bgm");
+ // Create an animation for moving the ball
+ animation = new Timeline(new KeyFrame(Duration.millis(1), new EventHandler() {
+ @Override
+ public void handle(ActionEvent t) {
+
+ timeSinceLastCollisionEvent++;
+ racketTime.setText("Frames since last collision: " + timeSinceLastCollisionEvent);
+ moveBall();
+ // Process collisions
+ if (y >= (getHeight() - 20) && (timeSinceLastCollisionEvent > COLLISION_COOLDOWN)) {
+ timeSinceLastCollisionEvent = 0;
+ playSound("collision");
+ incrementComputerScore();
+ }
+ if ((x <= 20 && (timeSinceLastCollisionEvent > COLLISION_COOLDOWN)) || ((x >= getWidth() - 20) && (timeSinceLastCollisionEvent > COLLISION_COOLDOWN))) {
+ timeSinceLastCollisionEvent = 0;
+ playSound("collision");
+ }
+ if (y <= 20 && (timeSinceLastCollisionEvent > COLLISION_COOLDOWN)) {
+ timeSinceLastCollisionEvent = 0;
+ playSound("collision");
+ }
+ }
+ })
+ );
+ animation.setRate(animation.getRate() * .5);
+ animation.setCycleCount(Timeline.INDEFINITE);
+
+ }
+
+ private boolean processRacketCollision() {
+ boolean racketCollision = racket.getBoundsInParent().intersects(circle.getBoundsInParent());
+
+ if (racketCollision && (timeSinceLastCollisionEvent > COLLISION_COOLDOWN)) { // This is second condition is a cooldown. It prevents odd behavior happening with the ball and the racket if the racket hits the ball at certain angles.
+ System.out.println("Racket collision detected!");
+ timeSinceLastCollisionEvent = 0;
+ incrementPlayerScore();
+ playSound("racket");
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ private void moveBall() {
+
+ // Check boundaries
+ if (x < radius || x > getWidth() - radius) {
+ dx *= -1; // Change ball move direction
+ }
+ if (y < radius || y > getHeight() - radius || processRacketCollision()) {
+ dy *= -1; // Change ball move direction
+ }
+
+ // Adjust ball position by 1 or -1
+ x += dx;
+ y += dy;
+ circle.setCenterX(x);
+ circle.setCenterY(y);
+ ballCoordsToLabel();
+ }
+
+ public void play() {
+ animation.play();
+ }
+
+ public void pause() {
+ animation.pause();
+ }
+
+ public void increaseSpeed() {
+ animation.setRate(animation.getRate() * 1.5);
+ System.out.println(animation.getRate());
+ }
+
+ public void decreaseSpeed() {
+ animation.setRate(animation.getRate() * 1.5 > 0 ? animation.getRate() / 1.5 : 0);
+ System.out.println(animation.getRate());
+ }
+
+ public DoubleProperty rateProperty() {
+ return animation.rateProperty();
+ }
+
+ public void moveRacket(double x) {
+ racket.relocate(x, getHeight() - 20);
+ }
+
+ public void showInfoLabel() {
+ double paneHeight = getHeight();
+ double paneWidth = getWidth();
+ getChildren().add(infoLabel);
+ // Center Text
+ infoLabel.relocate(paneWidth / 4.0, paneHeight / 2.0);
+ }
+
+ public void hideInfoLabel() {
+ getChildren().remove(infoLabel);
+ }
+
+ private void incrementPlayerScore() {
+ playerScoreLabel.setText("Player score: " + ++playerScore);
+ }
+
+ private void incrementComputerScore() {
+ computerScoreLabel.setText("Computer score: " + ++computerScore);
+
+ }
+
+ private void ballCoordsToLabel() {
+ ballCords.setText("Ball coords: " + x + ", " + y);
+ }
+
+ private void playSound(String sampleType) {
+ boolean isSfx = true;
+ String sample = "sound/sfx/Sample_00";
+ int randInt = (int) (Math.random() * 2);
+ switch (sampleType) {
+ case "collision":
+ randInt = (int) (Math.random() * 2);
+ isSfx = true;
+ switch (randInt) {
+ case 0:
+ sample += "05";
+ break;
+ case 1:
+ sample += "07";
+ break;
+ }
+ break;
+ case "racket":
+ randInt = (int) (Math.random() * 2);
+ isSfx = true;
+ switch (randInt) {
+ case 0:
+ sample += "10";
+ break;
+ case 1:
+ sample += "12";
+ break;
+ }
+ break;
+ case "bgm":
+ sample = "sound/bgm/";
+ randInt = (int) (Math.random() * 3);
+ isSfx = false;
+ switch (randInt) {
+ case 0:
+ currentlyPlaying = "Caleb Fontenot - Blips";
+ nowPlaying.setText("Now playing: " + currentlyPlaying);
+ break;
+ case 1:
+ currentlyPlaying = "Caleb Fontenot - DEAL WITH IT";
+ nowPlaying.setText("Now playing: " + currentlyPlaying);
+ break;
+ case 2:
+ currentlyPlaying = "Caleb Fontenot - Tomodachi Moment";
+ nowPlaying.setText("Now playing: " + currentlyPlaying);
+ break;
+ }
+ sample += currentlyPlaying;
+ break;
+ }
+ Media sound = new Media(new File(sample + ".wav").toURI().toString());
+ MediaPlayer mediaPlayer = new MediaPlayer(sound);
+ mediaPlayer.setStartTime(Duration.ZERO);
+ mediaPlayer.setAutoPlay(true);
+ // If we're playing BGM, lower the volume a little
+ if (!isSfx) {
+ mediaPlayer.setVolume(0.6);
+ mediaPlayer.setCycleCount(MediaPlayer.INDEFINITE);
+ }
+ mediaPlayer.play();
+ mediaPlayers.add(mediaPlayer); // Prevent the JVM's GC from deleting our media player if there's already one running
+ // Free the media player when it has finished playing a sound.
+ mediaPlayer.setOnEndOfMedia(new Runnable() {
+ @Override
+ public void run() {
+ //System.out.println("I'm done playing sound! Please take me to the ether, Java GC!");
+ mediaPlayer.stop();
+ mediaPlayer.dispose();
+ mediaPlayers.remove(mediaPlayer);
+ }
+ });
+ }
+}
diff --git a/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/src/MP2_chapter4_CalebFontenot/MediaType.java b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/src/MP2_chapter4_CalebFontenot/MediaType.java
new file mode 100644
index 0000000..ad455c7
--- /dev/null
+++ b/Semester 3/Assignments/MP2-chapter4_Java20_CalebFontenot/src/MP2_chapter4_CalebFontenot/MediaType.java
@@ -0,0 +1,26 @@
+/*
+ * 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 MP2_chapter4_CalebFontenot;
+
+import javafx.scene.media.MediaPlayer;
+
+/**
+ *
+ * @author caleb
+ */
+public class MediaType {
+ private MediaPlayer mediaPlayer;
+ private boolean isBgm;
+
+ public MediaType(MediaPlayer mediaPlayer, boolean isBgm) {
+ this.mediaPlayer = mediaPlayer;
+ this.isBgm = isBgm;
+ }
+
+ public boolean isIsBgm() {
+ return isBgm;
+ }
+
+}
diff --git a/Semester 3/Assignments/lab5-recursion2_CalebFontenot/nb-configuration.xml b/Semester 3/Assignments/lab5-recursion2_CalebFontenot/nb-configuration.xml
new file mode 100644
index 0000000..9c74157
--- /dev/null
+++ b/Semester 3/Assignments/lab5-recursion2_CalebFontenot/nb-configuration.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+ JDK_20
+
+