This commit is contained in:
2023-04-14 01:01:58 -05:00
parent 6dff1ff71c
commit 56681623cc
28 changed files with 2175 additions and 24 deletions

View File

@@ -0,0 +1,38 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>European.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.ST0 {color: #287bde}
.ST1 {color: #ffc66d}
.comment {color: #808080}
.whitespace {color: #505050}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/fun/European.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt</span><span class="comment"> to change this license</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java</span><span class="comment"> to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped.fun;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">interface</span> European <span class="literal">extends</span> Language, Religion, War {
<span class="literal">void</span> <span class="ST1">whatCountry</span>();
}
</pre></body>
</html>

View File

@@ -0,0 +1,67 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>French.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.ST0 {color: #287bde}
.string {color: #6a8759}
.ST1 {color: #ffc66d}
.comment {color: #808080}
.whitespace {color: #505050}
.ST2 {color: #9876aa; font-family: monospace; font-weight: bold; font-style: italic}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/fun/French.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt</span><span class="comment"> to change this license</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java</span><span class="comment"> to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped.fun;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">class</span> French <span class="literal">implements</span> European
{
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">whatCountry</span>() {
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">+++ I am from France! +++</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">speakLanguage</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">speak French</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">practiceReligion</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">Roman Catholic</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">WWI</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">In WW1 the French won -- Allies!</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">WWII</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">In WW2 the French wan -- Allies!</span><span class="string">&quot;</span>);
}
}
</pre></body>
</html>

View File

@@ -0,0 +1,69 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>German.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.ST0 {color: #287bde}
.string {color: #6a8759}
.ST1 {color: #ffc66d}
.comment {color: #808080}
.whitespace {color: #505050}
.ST2 {color: #9876aa; font-family: monospace; font-weight: bold; font-style: italic}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/fun/German.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt</span><span class="comment"> to change this license</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java</span><span class="comment"> to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped.fun;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">class</span> German <span class="literal">implements</span> European {
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">whatCountry</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">+++ I am from Germany! +++</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">speakLanguage</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">speak German</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">practiceReligion</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">Protestant</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">WWI</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">in WW1 the Germans lost -- Axis!</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">WWII</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">in WW2 the Germans lost -- Axis!</span><span class="string">&quot;</span>);
}
}
</pre></body>
</html>

View File

@@ -0,0 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Interface1.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.comment {color: #808080}
.whitespace {color: #505050}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/Interface1.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">interface</span> Interface1 {
<span class="literal">abstract</span> <span class="literal">void</span> I1();
}
</pre></body>
</html>

View File

@@ -0,0 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Interface2.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.comment {color: #808080}
.whitespace {color: #505050}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/Interface2.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">interface</span> Interface2 {
<span class="literal">abstract</span> <span class="literal">void</span> I2();
}
</pre></body>
</html>

View File

@@ -0,0 +1,47 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>InterfaceGrouped1.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.number {color: #6897bb}
.string {color: #6a8759}
.comment {color: #808080}
.whitespace {color: #505050}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/InterfaceGrouped1.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">interface</span> InterfaceGrouped1 <span class="literal">extends</span> Interface1, Interface2 {
<span class="literal">int</span> x = <span class="number">10</span>; <span class="comment">//public static shared by all who implement or extend the interface</span>
<span class="literal">abstract</span> <span class="literal">void</span> IG1();
<span class="literal">static</span> <span class="literal">void</span> staticMethodOfInterface() {
System.out.println(<span class="string">&quot;</span><span class="string">A static method inside an Interface is shared by every class</span><span class="string">&quot;</span> +
<span class="string">&quot;</span><span class="string"> that implements Interface InterfaceGrouped1.</span><span class="string">&quot;</span>);
}
<span class="literal">default</span> <span class="literal">void</span> defaultMethodOfInterface() {
System.out.println(<span class="string">&quot;</span><span class="string">The default implementation was used as there was no overriding</span><span class="string">&quot;</span> +
<span class="string">&quot;</span><span class="string"> by a class that was implemented the Interface InterfaceGrouped1.</span><span class="string">&quot;</span>);
}
}
</pre></body>
</html>

View File

@@ -0,0 +1,69 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Italian.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.ST0 {color: #287bde}
.string {color: #6a8759}
.ST1 {color: #ffc66d}
.comment {color: #808080}
.whitespace {color: #505050}
.ST2 {color: #9876aa; font-family: monospace; font-weight: bold; font-style: italic}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/fun/Italian.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt</span><span class="comment"> to change this license</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java</span><span class="comment"> to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped.fun;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">class</span> Italian <span class="literal">implements</span> European {
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">whatCountry</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">+++ I am from Itally! +++</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">speakLanguage</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">speak Italian</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">practiceReligion</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">Roman Catholic</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">WWI</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">in WW1 the Italians won -- Allies!</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">WWII</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">In WW2 the Italians lost -- Axis!</span><span class="string">&quot;</span>);
}
}
</pre></body>
</html>

View File

@@ -0,0 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Language.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.comment {color: #808080}
.whitespace {color: #505050}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/fun/Language.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped.fun;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">interface</span> Language {
<span class="literal">void</span> speakLanguage();
}
</pre></body>
</html>

View File

@@ -0,0 +1,42 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Religion.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.ST0 {color: #287bde}
.string {color: #6a8759}
.ST1 {color: #ffc66d}
.comment {color: #808080}
.whitespace {color: #505050}
.ST2 {color: #9876aa; font-family: monospace; font-weight: bold; font-style: italic}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/fun/Religion.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt</span><span class="comment"> to change this license</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java</span><span class="comment"> to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped.fun;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">interface</span> Religion {
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">practiceReligion</span>();
<span class="literal">default</span> <span class="literal">void</span> <span class="ST1">beforeChrist</span>() {
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">paganism</span><span class="string">&quot;</span>);
}
}
</pre></body>
</html>

View File

@@ -0,0 +1,69 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Russian.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.ST0 {color: #287bde}
.string {color: #6a8759}
.ST1 {color: #ffc66d}
.comment {color: #808080}
.whitespace {color: #505050}
.ST2 {color: #9876aa; font-family: monospace; font-weight: bold; font-style: italic}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/fun/Russian.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt</span><span class="comment"> to change this license</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java</span><span class="comment"> to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped.fun;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">class</span> Russian <span class="literal">implements</span> European {
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">whatCountry</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">+++ I am from Russia! +++</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">speakLanguage</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">speak Russian</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">practiceReligion</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">Orthodox</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">WWI</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">In WW1 the Russians won -- Allies!</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> <span class="ST1">WWII</span>()
{
System.<span class="ST2">out</span>.println(<span class="string">&quot;</span><span class="string">In WW2 the Russians won -- Allies!</span><span class="string">&quot;</span>);
}
}
</pre></body>
</html>

View File

@@ -0,0 +1,101 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>TestEuropeans.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.ST2 {font-family: monospace; font-weight: bold; font-style: italic}
.ST0 {color: #287bde}
.number {color: #6897bb}
.string {color: #6a8759}
.comment {color: #808080}
.whitespace {color: #505050}
.ST1 {color: #ffc66d; font-family: monospace; font-weight: bold; font-style: italic}
.ST3 {color: #9876aa; font-family: monospace; font-weight: bold; font-style: italic}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/fun/TestEuropeans.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt</span><span class="comment"> to change this license</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java</span><span class="comment"> to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped.fun;
<span class="literal">import</span> java.util.ArrayList;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">class</span> TestEuropeans {
<span class="literal">public</span> <span class="literal">static</span> <span class="literal">void</span> <span class="ST1">testWithArrayList</span>() {
ArrayList&lt;European&gt; europeans = <span class="literal">new</span> ArrayList();
europeans.add(<span class="literal">new</span> French());
europeans.add(<span class="literal">new</span> German());
europeans.add(<span class="literal">new</span> Russian());
europeans.add(<span class="literal">new</span> Italian());
<span class="literal">for</span> (European man : europeans) {
man.whatCountry();
man.beforeChrist();
man.practiceReligion();
man.speakLanguage();
man.WWI();
man.WWII();
}
}
<span class="literal">public</span> <span class="literal">static</span> <span class="literal">void</span> <span class="ST1">testWithArrayOfObjects</span>() {
European[] europeans = {
<span class="literal">new</span> French(),
<span class="literal">new</span> German(),
<span class="literal">new</span> Russian(),
<span class="literal">new</span> Italian()
};
<span class="literal">for</span> (European person : europeans) {
person.whatCountry();
person.beforeChrist();
person.practiceReligion();
person.speakLanguage();
person.WWI();
person.WWII();
}
}
<span class="literal">public</span> <span class="literal">static</span> <span class="literal">void</span> <span class="ST1">testWithArrayOfInterfaces</span>() {
European[] europeans = <span class="literal">new</span> European[<span class="number">4</span>];
europeans[<span class="number">0</span>] = <span class="literal">new</span> French();
europeans[<span class="number">1</span>] = <span class="literal">new</span> German();
europeans[<span class="number">2</span>] = <span class="literal">new</span> Russian();
europeans[<span class="number">3</span>] = <span class="literal">new</span> Italian();
<span class="literal">for</span> (European person : europeans) {
person.whatCountry();
person.beforeChrist();
person.practiceReligion();
person.speakLanguage();
person.WWI();
person.WWII();
}
}
<span class="literal">public</span> <span class="literal">static</span> <span class="literal">void</span> <span class="ST1">main</span>(String[] args) {
<span class="ST2">testWithArrayList</span>();
System.<span class="ST3">out</span>.println(<span class="string">&quot;</span><span class="string">-------------------</span><span class="string">&quot;</span>);
<span class="ST2">testWithArrayOfObjects</span>();
System.<span class="ST3">out</span>.println(<span class="string">&quot;</span><span class="string">-------------------</span><span class="string">&quot;</span>);
<span class="ST2">testWithArrayOfInterfaces</span>();
}
}
</pre></body>
</html>

View File

@@ -0,0 +1,57 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>TestEuropeansAgain.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.ST2 {font-family: monospace; font-weight: bold; font-style: italic}
.ST0 {color: #287bde}
.number {color: #6897bb}
.comment {color: #808080}
.whitespace {color: #505050}
.ST1 {color: #ffc66d; font-family: monospace; font-weight: bold; font-style: italic}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/fun/TestEuropeansAgain.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt</span><span class="comment"> to change this license</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java</span><span class="comment"> to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped.fun;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">class</span> TestEuropeansAgain {
<span class="literal">public</span> <span class="literal">static</span> <span class="literal">void</span> <span class="ST1">testWithArrayOfInterfaces</span>() {
European[] europeans = <span class="literal">new</span> European[<span class="number">4</span>];
europeans[<span class="number">0</span>] = <span class="literal">new</span> French();
europeans[<span class="number">1</span>] = <span class="literal">new</span> German();
europeans[<span class="number">2</span>] = <span class="literal">new</span> Russian();
europeans[<span class="number">3</span>] = <span class="literal">new</span> Italian();
<span class="literal">for</span> (European person : europeans) {
person.whatCountry();
person.beforeChrist();
person.practiceReligion();
person.speakLanguage();
person.WWI();
person.WWII();
}
}
<span class="literal">public</span> <span class="literal">static</span> <span class="literal">void</span> <span class="ST1">main</span>(String[] args) {
<span class="ST2">testWithArrayOfInterfaces</span>();
}
}
</pre></body>
</html>

View File

@@ -0,0 +1,62 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>TestInterfaces.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.string {color: #6a8759}
.comment {color: #808080}
.whitespace {color: #505050}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/TestInterfaces.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">class</span> TestInterfaces <span class="literal">implements</span> InterfaceGrouped1 {
@Override
<span class="literal">public</span> <span class="literal">void</span> IG1() {
System.out.println(<span class="string">&quot;</span><span class="string">TestInterfaces:IG1()</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> I1() {
System.out.println(<span class="string">&quot;</span><span class="string">TestInterfaces:I1()</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> I2() {
System.out.println(<span class="string">&quot;</span><span class="string">testInterfaces:I2()</span><span class="string">&quot;</span>);
}
@Override
<span class="literal">public</span> <span class="literal">void</span> defaultMethodOfInterface() {
System.out.println(<span class="string">&quot;</span><span class="string">overriden implementation of defaultMethodOfInterface</span><span class="string">&quot;</span>);
}
<span class="literal">public</span> <span class="literal">static</span> <span class="literal">void</span> main(String[] args)
{
System.out.println(TestInterfaces.x);
InterfaceGrouped1.staticMethodOfInterface();
TestInterfaces ti = <span class="literal">new</span> TestInterfaces();
ti.I1();
ti.I2();
ti.IG1();
ti.defaultMethodOfInterface();
}
}
</pre></body>
</html>

View File

@@ -0,0 +1,38 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>War.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace; font-weight: bold}
table {color: #888888; background-color: #313335; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
.ST0 {color: #287bde}
.ST1 {color: #ffc66d}
.comment {color: #808080}
.whitespace {color: #505050}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab8_2_CalebFontenot/src/main/java/com/calebfontenot/lab8_2_calebfontenot/interfacesGrouped/fun/War.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt</span><span class="comment"> to change this license</span>
<span class="comment"> * Click </span><span class="ST0">nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java</span><span class="comment"> to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab8_2_calebfontenot.interfacesGrouped.fun;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="comment">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">interface</span> War {
<span class="literal">void</span> <span class="ST1">WWI</span>();
<span class="literal">void</span> <span class="ST1">WWII</span>();
}
</pre></body>
</html>

View File

@@ -25,7 +25,7 @@ public class Italian implements European {
@Override
public void practiceReligion()
{
System.out.println("paganism");
System.out.println("Roman Catholic");
}
@Override

View File

@@ -12,8 +12,7 @@ import java.util.ArrayList;
*/
public class TestEuropeans {
public static void testWithArrayList()
{
public static void testWithArrayList() {
ArrayList<European> europeans = new ArrayList();
europeans.add(new French());
@@ -21,7 +20,7 @@ public class TestEuropeans {
europeans.add(new Russian());
europeans.add(new Italian());
for(European man: europeans) {
for (European man : europeans) {
man.whatCountry();
man.beforeChrist();
man.practiceReligion();
@@ -30,14 +29,15 @@ public class TestEuropeans {
man.WWII();
}
}
public static void testWithArrayOfObjects() {
European[] europeans = {
new French(),
new German(),
new Russian(),
new Italian()
};
for (European person: europeans) {
new French(),
new German(),
new Russian(),
new Italian()
};
for (European person : europeans) {
person.whatCountry();
person.beforeChrist();
person.practiceReligion();
@@ -46,15 +46,28 @@ public class TestEuropeans {
person.WWII();
}
}
public static void testWithArrayOfInterfaces() {
Interface[] interfaceArr = {
European[] europeans = new European[4];
europeans[0] = new French();
europeans[1] = new German();
europeans[2] = new Russian();
europeans[3] = new Italian();
for (European person : europeans) {
person.whatCountry();
person.beforeChrist();
person.practiceReligion();
person.speakLanguage();
person.WWI();
person.WWII();
}
}
public static void main(String[] args)
{
public static void main(String[] args) {
testWithArrayList();
System.out.println("-------------------");
testWithArrayOfObjects();
System.out.println("-------------------");
testWithArrayOfInterfaces();
}
}

View File

@@ -0,0 +1,31 @@
/*
* 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.lab8_2_calebfontenot.interfacesGrouped.fun;
/**
*
* @author caleb
*/
public class TestEuropeansAgain {
public static void testWithArrayOfInterfaces() {
European[] europeans = new European[4];
europeans[0] = new French();
europeans[1] = new German();
europeans[2] = new Russian();
europeans[3] = new Italian();
for (European person : europeans) {
person.whatCountry();
person.beforeChrist();
person.practiceReligion();
person.speakLanguage();
person.WWI();
person.WWII();
}
}
public static void main(String[] args) {
testWithArrayOfInterfaces();
}
}