Class Exercise8_2

java.lang.Object
  extended byExercise8_2

public class Exercise8_2
extends java.lang.Object

Testing use of interface in different package

Version:
1.0
Author:
Kristian Torp, torp (at) cs (dot) aau (dot) dk

Field Summary
private  java.lang.String latinName
          Latin name of animal
private  float weight
          Weight in kilos
 
Constructor Summary
Exercise8_2()
          Constructor for objects of class Exercise8_2
Exercise8_2(float weight, java.lang.String latineName)
          Constructor for objects of class Exercise8_2
 
Method Summary
 java.lang.String getLatinName()
          Gets the Latin name
 float getWeight()
          Gets the weight.
static void main(java.lang.String[] args)
          Main method for exercising the code.
 void setWeight(float weight)
          Sets the weigth
 java.lang.String toString()
          Overridding of toString method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

weight

private float weight
Weight in kilos


latinName

private java.lang.String latinName
Latin name of animal

Constructor Detail

Exercise8_2

public Exercise8_2()
Constructor for objects of class Exercise8_2


Exercise8_2

public Exercise8_2(float weight,
                   java.lang.String latineName)
Constructor for objects of class Exercise8_2

Method Detail

toString

public java.lang.String toString()
Overridding of toString method


getLatinName

public java.lang.String getLatinName()
Gets the Latin name

Returns:
Latin name

getWeight

public float getWeight()
Gets the weight.

Returns:
weight in kilos

setWeight

public void setWeight(float weight)
Sets the weigth


main

public static void main(java.lang.String[] args)
Main method for exercising the code.

Parameters:
args -