Question

In: Computer Science

In-line comments denote your changes and briefly describe the functionality of each method or element of...

  • In-line comments denote your changes and briefly describe the functionality of each method or element of the class
  • Appropriate variable and method naming conventions are used throughout your code
  • To start, modify the RescueAnimal.java class file by adding accessor and mutator methods for each class variable.

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

}

Solutions

Expert Solution

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;
   }
  
}


Related Solutions

PLEASE MODIFY CODE IN JAVA In-line comments denote your changes and briefly describe the functionality of...
PLEASE MODIFY CODE IN JAVA In-line comments denote your changes and briefly describe the functionality of each method or element of the class Appropriate variable and method naming conventions are used throughout your code. modify the Driver.java class file to do the following: Implement the method you have chosen Add attributes, as needed, to support the required functionality SYSTEM REQUIREMENTS- Each dog goes through a six- to nine month training regimen before they are put into service. Part of our...
Briefly describe your understanding on the role/functions of each element of the AIS model that follows....
Briefly describe your understanding on the role/functions of each element of the AIS model that follows. Provide example where applicable:       (i)    Data Sources       (ii)   Data collection       (iii) Data processing      (iv)   Information Generation      (v)   Feedback
Briefly describe each element of the accounting equation. Explain why it is necessary for the equation...
Briefly describe each element of the accounting equation. Explain why it is necessary for the equation to remain in balance.
Pick two of the following methods and briefly describe how they work. For each method that...
Pick two of the following methods and briefly describe how they work. For each method that is chosen, include a description of a research question (real or hypothetical) for each method, and please explain why it why chosen. Be as descriptive as possible Following methods to choose from: functional magnetic resonance imaging (fMRI) transcranial magnetic stimulation (TMS) electroencephalography (EEG) computed tomography (CT) diffusion tensor imaging (DTI)
briefly describe major element of the structural model in ood with Uml
briefly describe major element of the structural model in ood with Uml
Describe how quick changes are adapted and prevented in each method for source statistics? Explain in...
Describe how quick changes are adapted and prevented in each method for source statistics? Explain in elaborate?
Menu Writing - Python - Please include #Comments in each line for explanation (a) A common...
Menu Writing - Python - Please include #Comments in each line for explanation (a) A common task while writing any software is to display a menu and ask the user for a choice. One such example is the menu on your cellphone. It has messaging, contacts, games, settings, media, and web (and possibly others) as options. Write a function called display menu that displays the menu to the user and allows the user to make a choice (using input). (b)...
Describe briefly the principle of the Rational method and the limitation of this method for runoff...
Describe briefly the principle of the Rational method and the limitation of this method for runoff estimation. A sub-catchment of area 0.1km2 is built on gently sloping land. The average slope of the land is 0.001. The length of the longest natural flow path L is 276.3m. The flow time tf in the drainage system is 3min. Determine the 50yr design discharge for the subdivision using the rational method, given that the average runoff coefficient of the subdivision is C=0.7....
Briefly describe a method you would use to identify your personal performance in the workplace in...
Briefly describe a method you would use to identify your personal performance in the workplace in terms of feedback from others (in 30-50 words each).
Briefly describe a method you would use to identify your personal performance in the workplace in...
Briefly describe a method you would use to identify your personal performance in the workplace in terms of self-assessment (in 30-50 words each).
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT