Question
Need help writing the driver.java file for this project? Here is the code I have so far: import java.text.SimpleDateFormat; public class RescueAnimal { // Instance
Need help writing the driver.java file for this project?
Here is the code I have so far:
import java.text.SimpleDateFormat;
public class RescueAnimal {
// Instance 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() { }
//get and set 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; } }
public class Dog extends RescueAnimal {
// Instance variable public String breed;
// Constructor public Dog() { }
// Accessor Method public String getBreed() { return breed; }
// Mutator Method public void setBreed(String dogBreed) { breed = dogBreed; }
}
public class monkey extends RescueAnimal{ enum Species{ CAPUCHIN,GUENON,MACAQUE,MARMOSET,SQUIRRELMONKEY,TAMARIN; } private float taillength,height,bodyLength,torsoLength,skullLength,neckLength; Species species;
public float getTaillength() { return taillength; }
public void setTaillength(float taillength) { this.taillength = taillength; }
public float getHeight() { return height; }
public void setHeight(float height) { this.height = height; }
public float getBodyLength() { return bodyLength; }
public void setBodyLength(float bodyLength) { this.bodyLength = bodyLength; }
public float getTorsoLength() { return torsoLength; }
public void setTorsoLength(float torsoLength) { this.torsoLength = torsoLength; }
public float getSkullLength() { return skullLength; }
public void setSkullLength(float skullLength) { this.skullLength = skullLength; }
public float getNeckLength() { return neckLength; }
public void setNeckLength(float neckLength) { this.neckLength = neckLength; }
public Species getSpecies() { return species; }
public void setSpecies(Species species) { this.species = species; }
}
This is what I need for the driver file:
public static void main(String[] args) { // Instance variables // Create New Dog
// Create New Monkey
// Method to process request for a rescue animal
// Method(s) to update information on existing animals
// Method to display matrix of aninmals based on location and status/training phase
// Method to add animals
// Method to out process animals for the farm or in-service placement
// Method to display in-service animals
// Process reports from in-service agencies reporting death/retirement
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started