diff options
author | AlisaLinUwU <alisalinuwu@gmail.com> | 2025-01-26 10:48:43 +0500 |
---|---|---|
committer | AlisaLinUwU <alisalinuwu@gmail.com> | 2025-01-26 10:48:43 +0500 |
commit | 8a24dc018b6c5fb30f5ade6d28da700528fbcc5e (patch) | |
tree | aeef757ed85ea88f43d8c28076d1be7fe1aad9dd /src/com/mavlon/finances/Job.java |
Initializemain
Diffstat (limited to 'src/com/mavlon/finances/Job.java')
-rw-r--r-- | src/com/mavlon/finances/Job.java | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/com/mavlon/finances/Job.java b/src/com/mavlon/finances/Job.java new file mode 100644 index 0000000..11a7797 --- /dev/null +++ b/src/com/mavlon/finances/Job.java @@ -0,0 +1,66 @@ +package com.mavlon.finances; + +import java.io.Serializable; + +public class Job implements Serializable { + private String name; + private double hoursPerWeek; + private double hourlyPayRate; + + public Job() { + } + + public Job(String name) { + this.name = name; + } + + public Job(String name, int hoursPerWeek) { + this.name = name; + this.hoursPerWeek = hoursPerWeek; + } + + public Job(String name, int hoursPerWeek, int hourlyPayRate) { + this.name = name; + this.hoursPerWeek = hoursPerWeek; + this.hourlyPayRate = hourlyPayRate; + } + + public Job(String name, int hoursPerWeek, int hourlyPayRate, int monthsToWork) { + this.name = name; + this.hoursPerWeek = hoursPerWeek; + this.hourlyPayRate = hourlyPayRate; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public double getHoursPerWeek() { + return hoursPerWeek; + } + + public void setHoursPerWeek(double hoursPerWeek) { + this.hoursPerWeek = hoursPerWeek; + } + + public double getHourlyPayRate() { + return hourlyPayRate; + } + + public void setHourlyPayRate(double hourlyPayRate) { + this.hourlyPayRate = hourlyPayRate; + } + + @Override + public String toString() { + return "Job" + + "\nname = '" + name + '\'' + + "\nhours per week = " + hoursPerWeek + + "\nhourly pay rate = " + hourlyPayRate + + '\n'; + } +} |