Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am having trouble with creating the driver class of my java code. I seperated each class with bold font. I would like feedback on

I am having trouble with creating the driver class of my java code. I seperated each class with bold font. I would like feedback on each class thats completed and maybe anything else you may think would be needed. The driver.java class is not complete and I am having trouble finishing. I started to create the add animals intake option. The assignment is only to implement one however any additional functions i am interested in learning how to code them.

the task is to implement one of these functions:

-Ability to process requests for a rescue animal: In this case, we would receive the type of animal the customer wants and the country where the customer resides. If we have an animal in training in their country, we can reserve that animal for the customer.

Ability to update any information we have on our animals

Ability to see what animals we have in each phase at each location, including "intake" and "farm"

Ability to add animals (intake)

Ability to transfer service animals to the farm or place in-service

Ability to view which animals are in-service

Ability to process and receive reports from in-service agencies on the retirement or death of their rescue animal

Here is what i have coded so far with the 4 classes:

package com.Java;

//Inherit from the RescueAnimal class using extends

public class Monkey extends RescueAnimal {

//Variables are public and shared with other class

public float tailLength;

public float height;

public float bodyLength;

public String species;

public float measurementOfTorso;

public float measurementOfSkull;

public float measurementOfNeck;

//Constructor

public Monkey() {

}

//Accessor methods are used to get the values for all implemented attributes

public float getTailLength() {

return tailLength;

}

public float getHeight() {

return height;

}

public float getBodyLength() {

return bodyLength;

}

public String getSpecies() {

return species;

}

public float getMeasurementOfTorso() {

return measurementOfTorso;

}

public float getMeasurementOfSkull() {

return measurementOfSkull;

}

public float getMeasurementOfNeck() {

return measurementOfNeck;

}

//Mutator methods are used for all implemented attributes

public void setTailLength(float tailLength) {

this.tailLength = tailLength;

}

public void setHeight(float height) {

this.height = height;

}

public void setBodyLength(float bodyLength) {

this.bodyLength = bodyLength;

}

public void setMeasurementOfTorso(float measurementOfTorso) {

this.measurementOfTorso = measurementOfTorso;

}

public void setMeasurementOfSkull(float measurementOfSkull) {

this.measurementOfSkull = measurementOfSkull;

}

public void setMeasurementOfNeck(float measurementOfNeck) {

this.measurementOfNeck = measurementOfNeck;

}

}

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() {

}

public RescueAnimal(String name, String type, String gender, int age, float weight) {

this.name = name;

this.type = type;

this.gender = gender;

this.age = age;

this.weight = weight;

}

public void printRescueAnimalDetails() {

System.out.println(name);

System.out.println(type);

System.out.println(gender);

System.out.println(age);

System.out.println(weight);

}

// Accessor methods for all attributes

public String getName() {

return name;

}

public String getType() {

return type;

}

public String getGender() {

return gender;

}

public int getAge() {

return age;

}

public float getWeight() {

return weight;

}

public SimpleDateFormat getAcquisitionDate() {

return acquisitionDate;

}

public SimpleDateFormat getStatusDate() {

return statusDate;

}

public String getAcquisitionSource() {

return acquisitionSource;

}

public Boolean getReserved() {

return reserved;

}

public String getTrainingLocation() {

return trainingLocation;

}

public SimpleDateFormat getTrainingStart() {

return trainingStart;

}

public SimpleDateFormat getTrainingEnd() {

return trainingEnd;

}

public String getTrainingStatus() {

return trainingStatus;

}

public String getInServiceCountry() {

return inServiceCountry;

}

public String getInServiceCity() {

return inServiceCity;

}

public String getInServiceAgency() {

return inServiceAgency;

}

public String getInServicePOC() {

return inServicePOC;

}

public String getInServiceEmail() {

return inServiceEmail;

}

public String getInServicePhone() {

return inServicePhone;

}

public String getInServicePostalAddress() {

return inServicePostalAddress;

}

//Mutator methods for all implemented attributes

public void setGender(String gender) {

this.gender = gender;

}

public void setName(String name) {

this.name = name;

}

public void setType(String type) {

this.type = type;

}

public void setAge(int age) {

this.age = age;

}

public void setWeight(float weight) {

this.weight = weight;

}

public void setAcquisitionDate(SimpleDateFormat acquisitionDate) {

this.acquisitionDate = acquisitionDate;

}

public void setStatusDate(SimpleDateFormat statusDate) {

this.statusDate = statusDate;

}

public void setReserved(Boolean reserved) {

this.reserved = reserved;

}

public void setTrainingLocation(String trainingLocation) {

this.trainingLocation = trainingLocation;

}

public void setTrainingStart(SimpleDateFormat trainingStart) {

this.trainingStart = trainingStart;

}

public void setTrainingEnd(SimpleDateFormat trainingEnd) {

this.trainingEnd = trainingEnd;

}

public void setTrainingStatus(String trainingStatus) {

this.trainingStatus = trainingStatus;

}

public void setInServiceCountry(String inServiceCountry) {

this.inServiceCountry = inServiceCountry;

}

public void setInServiceCity(String inServiceCity) {

this.inServiceCity = inServiceCity;

}

public void setInServiceAgency(String inServiceAgency) {

this.inServiceAgency = inServiceAgency;

}

public void setInServicePOC(String inServicePOC ) {

this.inServicePOC = inServicePOC;

}

public void setInServiceEmail(String inServiceEmail) {

this.inServiceEmail = inServiceEmail;

}

public void setInServicePhone(String inServicePhone) {

this.inServicePhone = inServicePhone;

}

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 Driver {

public static void main(String[] args) {

// Instance variables

// Create New Dog

Dog dog1 = 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 animals 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Unity From Zero To Proficiency Beginner A Step By Step Guide To Coding Your First Game

Authors: Patrick Felicia

1st Edition

1091872023, 978-1091872028

More Books

Students also viewed these Programming questions

Question

What is the R equivalent data type to a Python float

Answered: 1 week ago

Question

Write an ATN parser (Section 12.3) for a subset of English.

Answered: 1 week ago

Question

Q.No.1 Explain Large scale map ? Q.No.2 Explain small scale map ?

Answered: 1 week ago