IT-144 Project 2

profilemwinqu1983
Project2_Part2_Monkey.java.java

package com.it145; /* * Use 'public' modifier with an "extends" key word on the Monkey java class so it is accessible to the entire application and inherit the properties of the RescuAnimail class */ public class Monkey extends RescueAnimal { /* * These class variables are public so they can only be shared with other * classes */ public float tailLength; public float height; public float bodyLength; public String species; public float torsoMeasurement; public float skullMeasurement; public float neckMeasurement; // Use a parameterized constructor to provide different values to distinct // objects and the public class so its available to the entire application public Monkey() { } /* * Use Accessor Methods with public modifiers to access each of the class' * fields and return its value and make available to other classes Use float * type to allow inputs to not have to be whole numbers and the string type to * alloe a sequence of char to be inputted. */ /** * @return the tailLength */ public float getTailLength() { return tailLength; } /** * @return the height */ public float getHeight() { return height; } /** * @return the bodyLength */ public float getBodyLength() { return bodyLength; } /** * @return the species */ public String getSpecies() { return species; } /** * @return the torsoMeasurement */ public float getTorsoMeasurement() { return torsoMeasurement; } /** * @return the skullMeasurement */ public float getSkullMeasurement() { return skullMeasurement; } /** * @return the neckMeasurement */ public float getNeckMeasurement() { return neckMeasurement; } /* * Use Mutator Methods here with a 'public' modifier and a 'void' keyword to * modify the value of the class' fields while allowing access to other classes * access and indicate the methods do not need to hava return type */ /** * @param tailLength */ public void setTailLength(float tailLength) { this.tailLength = tailLength; } /** * @param height */ public void setHeight(float height) { this.height = height; } /** * @param bodyLength */ public void setBodyLength(float bodyLength) { this.bodyLength = bodyLength; } /** * @param species */ public void setSpecies(String species) { this.species = species; } /** * @param torsoMeasurement */ public void setTorsoMeasurement(float torsoMeasurement) { this.torsoMeasurement = torsoMeasurement; } /** * @param skullMeasurement */ public void setSkullMeasurement(float skullMeasurement) { this.skullMeasurement = skullMeasurement; } /** * @param neckMeasurement */ public void setNeckMeasurement(float neckMeasurement) { this.neckMeasurement = neckMeasurement; } }