diff --git a/.gitignore b/.gitignore index 65fe8a6..a9e193b 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,6 @@ /Semester 2/Assignments/lab4_CalebFontenot/target/ /Semester 2/Exams/PracticeExam1/target/ /Semester 2/Assignments/lab5_CalebFontenot/target/ +/Semester 1/Assignments/test/target/ +/Semester 2/Assignments/test/target/ +/Semester 2/Assignments/lab5__CalebFontenot/target/ diff --git a/Semester 2/Assignments/MP4_CalebFontenot/pom.xml b/Semester 2/Assignments/MP4_CalebFontenot/pom.xml new file mode 100644 index 0000000..60b0786 --- /dev/null +++ b/Semester 2/Assignments/MP4_CalebFontenot/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + com.calebfontenot + MP4_CalebFontenot + 1.0-SNAPSHOT + jar + + UTF-8 + 1.8 + 1.8 + com.calebfontenot.mp4_calebfontenot.MP4_CalebFontenot + + \ No newline at end of file diff --git a/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/Bicycle.java b/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/Bicycle.java new file mode 100644 index 0000000..aa638c8 --- /dev/null +++ b/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/Bicycle.java @@ -0,0 +1,94 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + */ + +package com.calebfontenot.mp4_calebfontenot; + +/** + * + * @author caleb + */ +public abstract class Bicycle { + + private int cadence; + private int gear; + private int speed; + + public Bicycle(int cadence, int gear, int speed) + { + this.cadence = cadence; + this.gear = gear; + this.speed = speed; + } + + + /** + * Get the value of speed + * + * @return the value of speed + */ + public int getSpeed() + { + return speed; + } + + /** + * Set the value of speed + * + * @param speed new value of speed + */ + public void setSpeed(int speed) + { + this.speed = speed; + } + + + /** + * Get the value of gear + * + * @return the value of gear + */ + public int getGear() + { + return gear; + } + + /** + * Set the value of gear + * + * @param gear new value of gear + */ + public void setGear(int gear) + { + this.gear = gear; + } + + + /** + * Get the value of cadence + * + * @return the value of cadence + */ + public int getCadence() + { + return cadence; + } + + /** + * Set the value of cadence + * + * @param cadence new value of cadence + */ + public void setCadence(int cadence) + { + this.cadence = cadence; + } + + @Override + public String toString() + { + return "Bicycle{" + "cadence=" + cadence + ", gear=" + gear + ", speed=" + speed + '}'; + } + + abstract Details calculatedDetains(); +} diff --git a/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/Details.java b/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/Details.java new file mode 100644 index 0000000..de93c60 --- /dev/null +++ b/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/Details.java @@ -0,0 +1,37 @@ +/* + * 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.mp4_calebfontenot; + +/** + * + * @author caleb + */ +public class Details { + + private int rank; + private String info; + + public void setRank(int rank) + { + this.rank = rank; + } + + public int getRank() + { + return rank; + } + + + + public static Details getDetails(Bicycle b) { + if (b instanceof SpeedBike) { + if ((SpeedBike) b.speed) { + + } + } else if (b instanceof MountainBike) { + + } + } +} diff --git a/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/MountainBike.java b/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/MountainBike.java new file mode 100644 index 0000000..c919271 --- /dev/null +++ b/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/MountainBike.java @@ -0,0 +1,37 @@ +/* + * 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.mp4_calebfontenot; + +/** + * + * @author caleb + */ +public class MountainBike extends Bicycle { + + private int seatHeight; + + public MountainBike( int seatHeight, int cadence, int gear, int speed) + { + super(cadence, gear, speed); + this.seatHeight = seatHeight; + } + + @Override + public String toString() + { + return super.toString() + "MountainBike{" + "seatHeight=" + seatHeight + '}'; + } + + /** + * Set the value of seatHeight + * + * @param seatHeight new value of seatHeight + */ + public void setSeatHeight(int seatHeight) + { + this.seatHeight = seatHeight; + } + +} diff --git a/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/SpeedBike.java b/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/SpeedBike.java new file mode 100644 index 0000000..63b4cc4 --- /dev/null +++ b/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/SpeedBike.java @@ -0,0 +1,47 @@ +/* + * 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.mp4_calebfontenot; + +/** + * + * @author caleb + */ +public class SpeedBike extends Bicycle{ + + private double weight; + + public SpeedBike(double weight, int cadence, int gear, int speed) + { + super(cadence, gear, speed); + this.weight = weight; + } + + /** + * Get the value of weight + * + * @return the value of weight + */ + public double getWeight() + { + return weight; + } + + /** + * Set the value of weight + * + * @param weight new value of weight + */ + public void setWeight(double weight) + { + this.weight = weight; + } + + @Override + public String toString() + { + return super.toString() + "SpeedBike{" + "weight=" + weight + '}'; + } + +} diff --git a/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/Company.html b/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/Company.html new file mode 100644 index 0000000..659dc08 --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/Company.html @@ -0,0 +1,139 @@ + + + +Company.java + + + + +
/home/caleb/ASDV-Java/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Company.java
+
+/*
+ * 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.test;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+/**
+ *
+ * @author caleb
+ */
+public class Company {
+    
+    private ArrayList<Employee> employees = new ArrayList<Employee>();
+    
+    public boolean addToGroup(Employee e) {
+        employees.add(e);
+        return true;
+    }
+    
+    public boolean removeFromGroup(Employee e) {
+        if (employees.contains(e)) {
+            employees.remove(e);
+            return true;
+        } else {
+            return false;
+        }
+    }
+    
+        public static void sortBySalary (ArrayList<Employee> arr) {
+        for (int i = 0; i < arr.size() - 1; ++i) {
+            for (int j = i+1; j < arr.size(); ++j)
+                if (arr.get(i).computePay() < arr.get(j).computePay()) {
+                    Employee temp = arr.get(i);
+                    arr.set(i, arr.get(j)) ;
+                    arr.set(j, temp);
+                }
+        }
+    }
+    
+    public static void sortBySalary (Employee arr[]) {
+        for (int i = 0; i < arr.length - 1; ++i) {
+            for (int j = i+1; j < arr.length; ++j)
+                if (arr[i].computePay() < arr[j].computePay()) {
+                    Employee temp = arr[i];
+                    arr[i] = arr[j];
+                    arr[j] = temp;
+                }
+        }
+    }
+
+    @Override
+    public String toString()
+    {
+        return "Company{" + "employees=" + employees + '}';
+    }
+   
+    public static void print(Employee[] arr) {
+        for(Employee e: arr) {
+            System.out.println(e);
+            System.out.println("-----------------------");
+        }
+    }
+    
+    public static void print(Object[] arr) {
+        for (Object e: arr) {
+            if (e instanceof Employee)
+                System.out.println(e + " " + ((Employee) e).computePay());
+            System.out.println("-----------------------");
+        }
+    }
+    /*
+public static void main(String[] args) {
+        SalaryEmployee se1 = new SalaryEmployee(50000, "john", new Date());
+        SalaryEmployee se2 = new SalaryEmployee(60000, "mary", new Date());
+        WageEmployee we1 = new WageEmployee(20, 150, "paul", new Date());
+        WageEmployee we2 = new WageEmployee(20, 150, "anna", new Date());
+        
+        ArrayList<Employee> list = new ArrayList<>();
+        list.add(se1);
+        list.add(se2);
+        list.add(we1);
+        list.add(we2);
+        System.out.println(list);
+        
+        Employee[] ar = new Employee[4];
+        ar[0] = se1;
+        ar[1] = se2;
+        ar[2] = we1;
+        ar[3] = we2;
+        
+        print(ar);
+        sortBySalary(ar);
+        print(ar);
+    }
+*/
+    public static void main(String[] args)
+    {
+        Company c =new Company();
+       c.addToGroup(new WageEmployee(10, 160, "Mary Poppins", new GregorianCalendar(1990, 12, 18).getTime()));
+       c.addToGroup(new WageEmployee(12, 160, "John Wayne", new GregorianCalendar(1920, 11, 2).getTime()));
+       c.addToGroup(new SalaryEmployee(70000, "Marylyn Monroe", new GregorianCalendar(1920, 11, 2).getTime()));
+       c.addToGroup(new Manager(40000, "Brad Pitt", new GregorianCalendar(1920, 11, 2).getTime()));
+        System.out.println(c);
+        System.out.println("------------------------------------");
+       Company.print(c.employees.toArray());
+        System.out.println("------------------------------------");
+        System.out.println("sort by salary");
+       Company.sortBySalary(c.employees);
+       Company.print(c.employees.toArray());
+       
+    }
+}
+
+
+ diff --git a/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/Employee.html b/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/Employee.html new file mode 100644 index 0000000..960fccb --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/Employee.html @@ -0,0 +1,60 @@ + + + +Employee.java + + + + +
/home/caleb/ASDV-Java/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Employee.java
+
+/*
+ * 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.test;
+
+import java.util.Date;
+
+/**
+ *
+ * @author Jude
+ */
+public abstract class Employee {
+    private String name;
+    private Date dateHired;
+    
+    public Employee() { }
+    
+    public Employee(String name, Date dateHired) {
+        this.name = name;
+        this.dateHired = dateHired;
+    }
+    
+    public String getName() { return name; }
+    public void setName(String newName) { name = newName; }
+    
+    public Date getDateHired() { return dateHired; }
+    public void setDateHired(Date date) { dateHired = date; }
+
+    @Override
+    public String toString() {
+        return "Employee{" + "name=" + name + ", dateHired=" + dateHired + '}';
+    }
+    
+    public abstract double computePay();
+}
+
+
+ diff --git a/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/Manager.html b/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/Manager.html new file mode 100644 index 0000000..f615bdb --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/Manager.html @@ -0,0 +1,57 @@ + + + +Manager.java + + + + +
/home/caleb/ASDV-Java/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Manager.java
+
+/*
+ * 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.test;
+
+import java.util.ArrayList;
+import java.util.Date;
+
+/**
+ *
+ * @author caleb
+ */
+public class Manager extends SalaryEmployee {
+    
+    
+    public Manager(double yearlySalary, String name, Date dateHired) {
+        super(yearlySalary, name, dateHired);
+    }
+    
+    @Override
+    public double computePay() {
+        return super.computePay() * 2;
+    }
+    
+    @Override
+    public String toString()
+    {
+        return super.toString() + "Manager{" + '}';
+    }
+    
+}
+
+
+ diff --git a/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/SalaryEmployee.html b/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/SalaryEmployee.html new file mode 100644 index 0000000..df3c92a --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/SalaryEmployee.html @@ -0,0 +1,60 @@ + + + +SalaryEmployee.java + + + + +
/home/caleb/ASDV-Java/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/SalaryEmployee.java
+
+/*
+ * 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.test;
+
+import java.util.Date;
+
+/**
+ *
+ * @author Jude
+ */
+public class SalaryEmployee extends Employee {
+    
+    private double yearlySalary;
+    public double getYearlySalary() { return yearlySalary; }    
+    public void setYearlySalary(double yearlySalary) { this.yearlySalary = yearlySalary; }
+    
+    public SalaryEmployee(double yearlySalary, String name, Date dateHired) {
+        super(name, dateHired);
+        this.yearlySalary = yearlySalary;
+    }
+    
+    @Override
+    public double computePay() {
+        return this.yearlySalary / 52;
+    }
+
+    @Override
+    public String toString() {
+        return super.toString() + "SalaryEmployee{" + "yearlySalary=" + yearlySalary + '}';
+    }
+
+    
+}
+
+
+ diff --git a/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/WageEmployee.html b/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/WageEmployee.html new file mode 100644 index 0000000..fece6a1 --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot/Printed HTMLs/WageEmployee.html @@ -0,0 +1,73 @@ + + + +WageEmployee.java + + + + +
/home/caleb/ASDV-Java/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/WageEmployee.java
+
+/*
+ * 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.test;
+
+import java.util.Date;
+
+/**
+ *
+ * @author Jude
+ */
+public class WageEmployee extends Employee {
+    
+    private double wage;
+
+    
+    public WageEmployee(double wage, double hours)
+    {
+        this.wage = wage;
+        this.hours = hours;
+    }
+
+    public WageEmployee(double wage, double hours, String name, Date dateHired)
+    {
+        super(name, dateHired);
+        this.wage = wage;
+        this.hours = hours;
+    }
+    
+    public double getWage() { return wage; }
+    public void setWage(double wage) { this.wage = wage; }
+
+    private double hours;
+    public double getHours() { return hours; }
+    public void setHours(double hours) { this.hours = hours; }
+
+    @Override
+    public double computePay() {
+        return this.wage * this.hours;
+    }
+
+    @Override
+    public String toString() {
+        return super.toString() + "WageEmployee{" + "wage=" + wage + ", hours=" + hours + '}';
+    }
+
+    
+}
+
+
+ diff --git a/Semester 2/Assignments/lab5_CalebFontenot/pom.xml b/Semester 2/Assignments/lab5_CalebFontenot/pom.xml new file mode 100644 index 0000000..ccef9b9 --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + com.calebfontenot + lab5_CalebFontenot + 1.0-SNAPSHOT + jar + + UTF-8 + 1.8 + 1.8 + com.calebfontenot.test.Test + + lab5_CalebFontenot + \ No newline at end of file diff --git a/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Company.java b/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Company.java new file mode 100644 index 0000000..0e8dbfa --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Company.java @@ -0,0 +1,116 @@ +/* + * 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.test; + +import java.util.ArrayList; +import java.util.Date; +import java.util.GregorianCalendar; + +/** + * + * @author caleb + */ +public class Company { + + private ArrayList employees = new ArrayList(); + + public boolean addToGroup(Employee e) { + employees.add(e); + return true; + } + + public boolean removeFromGroup(Employee e) { + if (employees.contains(e)) { + employees.remove(e); + return true; + } else { + return false; + } + } + + public static void sortBySalary (ArrayList arr) { + for (int i = 0; i < arr.size() - 1; ++i) { + for (int j = i+1; j < arr.size(); ++j) + if (arr.get(i).computePay() < arr.get(j).computePay()) { + Employee temp = arr.get(i); + arr.set(i, arr.get(j)) ; + arr.set(j, temp); + } + } + } + + public static void sortBySalary (Employee arr[]) { + for (int i = 0; i < arr.length - 1; ++i) { + for (int j = i+1; j < arr.length; ++j) + if (arr[i].computePay() < arr[j].computePay()) { + Employee temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + } + } + } + + @Override + public String toString() + { + return "Company{" + "employees=" + employees + '}'; + } + + public static void print(Employee[] arr) { + for(Employee e: arr) { + System.out.println(e); + System.out.println("-----------------------"); + } + } + + public static void print(Object[] arr) { + for (Object e: arr) { + if (e instanceof Employee) + System.out.println(e + " " + ((Employee) e).computePay()); + System.out.println("-----------------------"); + } + } + /* +public static void main(String[] args) { + SalaryEmployee se1 = new SalaryEmployee(50000, "john", new Date()); + SalaryEmployee se2 = new SalaryEmployee(60000, "mary", new Date()); + WageEmployee we1 = new WageEmployee(20, 150, "paul", new Date()); + WageEmployee we2 = new WageEmployee(20, 150, "anna", new Date()); + + ArrayList list = new ArrayList<>(); + list.add(se1); + list.add(se2); + list.add(we1); + list.add(we2); + System.out.println(list); + + Employee[] ar = new Employee[4]; + ar[0] = se1; + ar[1] = se2; + ar[2] = we1; + ar[3] = we2; + + print(ar); + sortBySalary(ar); + print(ar); + } +*/ + public static void main(String[] args) + { + Company c =new Company(); + c.addToGroup(new WageEmployee(10, 160, "Mary Poppins", new GregorianCalendar(1990, 12, 18).getTime())); + c.addToGroup(new WageEmployee(12, 160, "John Wayne", new GregorianCalendar(1920, 11, 2).getTime())); + c.addToGroup(new SalaryEmployee(70000, "Marylyn Monroe", new GregorianCalendar(1920, 11, 2).getTime())); + c.addToGroup(new Manager(40000, "Brad Pitt", new GregorianCalendar(1920, 11, 2).getTime())); + System.out.println(c); + System.out.println("------------------------------------"); + Company.print(c.employees.toArray()); + System.out.println("------------------------------------"); + System.out.println("sort by salary"); + Company.sortBySalary(c.employees); + Company.print(c.employees.toArray()); + + } +} diff --git a/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Employee.java b/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Employee.java new file mode 100644 index 0000000..f03cca9 --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Employee.java @@ -0,0 +1,36 @@ +/* + * 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.test; + +import java.util.Date; + +/** + * + * @author Jude + */ +public abstract class Employee { + private String name; + private Date dateHired; + + public Employee() { } + + public Employee(String name, Date dateHired) { + this.name = name; + this.dateHired = dateHired; + } + + public String getName() { return name; } + public void setName(String newName) { name = newName; } + + public Date getDateHired() { return dateHired; } + public void setDateHired(Date date) { dateHired = date; } + + @Override + public String toString() { + return "Employee{" + "name=" + name + ", dateHired=" + dateHired + '}'; + } + + public abstract double computePay(); +} diff --git a/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Manager.java b/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Manager.java new file mode 100644 index 0000000..4966102 --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/Manager.java @@ -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.test; + +import java.util.ArrayList; +import java.util.Date; + +/** + * + * @author caleb + */ +public class Manager extends SalaryEmployee { + + + public Manager(double yearlySalary, String name, Date dateHired) { + super(yearlySalary, name, dateHired); + } + + @Override + public double computePay() { + return super.computePay() * 2; + } + + @Override + public String toString() + { + return super.toString() + "Manager{" + '}'; + } + +} diff --git a/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/SalaryEmployee.java b/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/SalaryEmployee.java new file mode 100644 index 0000000..dbbb3c4 --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/SalaryEmployee.java @@ -0,0 +1,35 @@ +/* + * 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.test; + +import java.util.Date; + +/** + * + * @author Jude + */ +public class SalaryEmployee extends Employee { + + private double yearlySalary; + public double getYearlySalary() { return yearlySalary; } + public void setYearlySalary(double yearlySalary) { this.yearlySalary = yearlySalary; } + + public SalaryEmployee(double yearlySalary, String name, Date dateHired) { + super(name, dateHired); + this.yearlySalary = yearlySalary; + } + + @Override + public double computePay() { + return this.yearlySalary / 52; + } + + @Override + public String toString() { + return super.toString() + "SalaryEmployee{" + "yearlySalary=" + yearlySalary + '}'; + } + + +} diff --git a/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/WageEmployee.java b/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/WageEmployee.java new file mode 100644 index 0000000..5ffe8da --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/test/WageEmployee.java @@ -0,0 +1,49 @@ +/* + * 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.test; + +import java.util.Date; + +/** + * + * @author Jude + */ +public class WageEmployee extends Employee { + + private double wage; + + + public WageEmployee(double wage, double hours) + { + this.wage = wage; + this.hours = hours; + } + + public WageEmployee(double wage, double hours, String name, Date dateHired) + { + super(name, dateHired); + this.wage = wage; + this.hours = hours; + } + + public double getWage() { return wage; } + public void setWage(double wage) { this.wage = wage; } + + private double hours; + public double getHours() { return hours; } + public void setHours(double hours) { this.hours = hours; } + + @Override + public double computePay() { + return this.wage * this.hours; + } + + @Override + public String toString() { + return super.toString() + "WageEmployee{" + "wage=" + wage + ", hours=" + hours + '}'; + } + + +} diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/A.class b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/A.class new file mode 100644 index 0000000..7a7613e Binary files /dev/null and b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/A.class differ diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/B.class b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/B.class new file mode 100644 index 0000000..a4aa488 Binary files /dev/null and b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/B.class differ diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Employee.class b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Employee.class new file mode 100644 index 0000000..fd0003c Binary files /dev/null and b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Employee.class differ diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Faculty.class b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Faculty.class new file mode 100644 index 0000000..121e951 Binary files /dev/null and b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Faculty.class differ diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Person.class b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Person.class new file mode 100644 index 0000000..7bf40ec Binary files /dev/null and b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Person.class differ diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Staff.class b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Staff.class new file mode 100644 index 0000000..412f380 Binary files /dev/null and b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Staff.class differ diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Status.class b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Status.class new file mode 100644 index 0000000..42f8386 Binary files /dev/null and b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Status.class differ diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Student.class b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Student.class new file mode 100644 index 0000000..3e8fcd0 Binary files /dev/null and b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/Student.class differ diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/lab5_CalebFontenot.class b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/lab5_CalebFontenot.class new file mode 100644 index 0000000..dcbd178 Binary files /dev/null and b/Semester 2/Assignments/lab5_CalebFontenot__/target/classes/com/calebfontenot/lab5_calebfontenot/lab5_CalebFontenot.class differ diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/lab5_CalebFontenot-1.0-SNAPSHOT.jar b/Semester 2/Assignments/lab5_CalebFontenot__/target/lab5_CalebFontenot-1.0-SNAPSHOT.jar new file mode 100644 index 0000000..3900611 Binary files /dev/null and b/Semester 2/Assignments/lab5_CalebFontenot__/target/lab5_CalebFontenot-1.0-SNAPSHOT.jar differ diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/maven-archiver/pom.properties b/Semester 2/Assignments/lab5_CalebFontenot__/target/maven-archiver/pom.properties new file mode 100644 index 0000000..0ff54f3 --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot__/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Thu Mar 02 10:45:46 CST 2023 +version=1.0-SNAPSHOT +groupId=com.calebfontenot +artifactId=lab5_CalebFontenot diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/Semester 2/Assignments/lab5_CalebFontenot__/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..030d7ca --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot__/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,3 @@ +com/calebfontenot/lab5_calebfontenot/A.class +com/calebfontenot/lab5_calebfontenot/B.class +com/calebfontenot/lab5_calebfontenot/lab5_CalebFontenot.class diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/Semester 2/Assignments/lab5_CalebFontenot__/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..1017285 --- /dev/null +++ b/Semester 2/Assignments/lab5_CalebFontenot__/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,2 @@ +/home/caleb/ASDV-Java/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/lab5_calebfontenot/A.java +/home/caleb/ASDV-Java/Semester 2/Assignments/lab5_CalebFontenot/src/main/java/com/calebfontenot/lab5_calebfontenot/lab5_CalebFontenot.java diff --git a/Semester 2/Assignments/lab5_CalebFontenot__/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/Semester 2/Assignments/lab5_CalebFontenot__/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/Semester 2/ZIPs/lab5_CalebFontenot.zip b/Semester 2/ZIPs/lab5_CalebFontenot.zip new file mode 100644 index 0000000..8632a81 Binary files /dev/null and b/Semester 2/ZIPs/lab5_CalebFontenot.zip differ