In: Computer Science
SYSTEM REQUIREMENTS-
Each dog goes through a six- to ninemonth training regimen before they are put into service. Part of our process is to record and track several data points about the rescue animals.
Dogs are given the status of "intake" before training starts. Once in training, they move through a set of five rigorous phases: Phase I, Phase II, Phase III, Phase IV, and Phase V. While in training, a dog is given the status of its current training phase (e.g., "Phase I"). When a dog graduates from training, it is given the status of "in service" and is eligible for use by clients. If a dog does not successfully make it through training, it is given the status of "farm," indicating that it will live a life of leisure on a Grazioso Salvare farm.
The Animals Through years of experience, we have narrowed the list of dog breeds eligible for rescue training to the following:
• American pit bull terrier • Beagle • Belgian Malinois • Border collie • Bloodhound • Coonhound • English springer spaniel • German shepherd • German shorthaired pointer • Golden retriever • Labrador retriever • Nova Scotia duck tolling retriever • Rough collie • Smooth collie
When we acquire a dog, we record the breed, gender, age, weight, date, and the location where we obtained them. There is usually a short lag time between when we acquire a dog and when they start training, which we document as well. Additionally, we track graduation dates, dates dogs are placed into "service," and details about the dogs' in-service placement (agency, city, country, and name, email address, phone number, and mailing address for the agency's point of contact).
RESCUE ANIMAL CODE
import java.text.SimpleDateFormat;
public class RescueAnimal {
// Class variables
private String name;
private String type;
private String gender;
private int age;
private float weight;
private SimpleDateFormat acquisitionDate;
private SimpleDateFormat statusDate;
private String acquisitionSource;
private Boolean reserved;
private String trainingLocation;
private SimpleDateFormat trainingStart;
private SimpleDateFormat trainingEnd;
private String trainingStatus;
private String inServiceCountry;
private String inServiceCity;
private String inServiceAgency;
private String inServicePOC;
private String inServiceEmail;
private String inServicePhone;
private String inServicePostalAddress;
// Constructor
public RescueAnimal() {
}
// Add Accessor Methods here
// Add Mutator Methods here
}
Code-
import java.text.SimpleDateFormat;
public class RescueAnimal {
// Class variables
private String name;
private String type;
private String gender;
private int age;
private float weight;
private SimpleDateFormat acquisitionDate;
private SimpleDateFormat statusDate;
private String acquisitionSource;
private Boolean reserved;
private String trainingLocation;
private SimpleDateFormat trainingStart;
private SimpleDateFormat trainingEnd;
private String trainingStatus;
private String inServiceCountry;
private String inServiceCity;
private String inServiceAgency;
private String inServicePOC;
private String inServiceEmail;
private String inServicePhone;
private String inServicePostalAddress;
// Constructor
public RescueAnimal() {
}
//Getter and setter methods
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public float getWeight() {
return weight;
}
public void setWeight(float weight) {
this.weight = weight;
}
public SimpleDateFormat getAcquisitionDate()
{
return acquisitionDate;
}
public void setAcquisitionDate(SimpleDateFormat
acquisitionDate) {
this.acquisitionDate =
acquisitionDate;
}
public SimpleDateFormat getStatusDate() {
return statusDate;
}
public void setStatusDate(SimpleDateFormat
statusDate) {
this.statusDate = statusDate;
}
public String getAcquisitionSource() {
return acquisitionSource;
}
public void setAcquisitionSource(String
acquisitionSource) {
this.acquisitionSource =
acquisitionSource;
}
public Boolean getReserved() {
return reserved;
}
public void setReserved(Boolean reserved) {
this.reserved = reserved;
}
public String getTrainingLocation() {
return trainingLocation;
}
public void setTrainingLocation(String
trainingLocation) {
this.trainingLocation =
trainingLocation;
}
public SimpleDateFormat getTrainingStart() {
return trainingStart;
}
public void setTrainingStart(SimpleDateFormat
trainingStart) {
this.trainingStart =
trainingStart;
}
public SimpleDateFormat getTrainingEnd() {
return trainingEnd;
}
public void setTrainingEnd(SimpleDateFormat
trainingEnd) {
this.trainingEnd =
trainingEnd;
}
public String getTrainingStatus() {
return trainingStatus;
}
public void setTrainingStatus(String
trainingStatus) {
this.trainingStatus =
trainingStatus;
}
public String getInServiceCountry() {
return inServiceCountry;
}
public void setInServiceCountry(String
inServiceCountry) {
this.inServiceCountry =
inServiceCountry;
}
public String getInServiceCity() {
return inServiceCity;
}
public void setInServiceCity(String inServiceCity)
{
this.inServiceCity =
inServiceCity;
}
public String getInServiceAgency() {
return inServiceAgency;
}
public void setInServiceAgency(String
inServiceAgency) {
this.inServiceAgency =
inServiceAgency;
}
public String getInServicePOC() {
return inServicePOC;
}
public void setInServicePOC(String inServicePOC)
{
this.inServicePOC =
inServicePOC;
}
public String getInServiceEmail() {
return inServiceEmail;
}
public void setInServiceEmail(String
inServiceEmail) {
this.inServiceEmail =
inServiceEmail;
}
public String getInServicePhone() {
return inServicePhone;
}
public void setInServicePhone(String
inServicePhone) {
this.inServicePhone =
inServicePhone;
}
public String getInServicePostalAddress() {
return
inServicePostalAddress;
}
public void setInServicePostalAddress(String
inServicePostalAddress) {
this.inServicePostalAddress =
inServicePostalAddress;
}
}