Relative Content

Tag Archive for javadebugging

How can I modify the code to handle the absence of the “animal.txt” file without printing an error message?

This assignment requires you to implement at least four classes. The first class, Animal, stores basic data about an animal. The second class Pet, stores additional data about an animal which is a pet. The third class ZooAnimal, stores additional data about an animal which is kept in a zoo. The fourth class ProgThree has a main method which reads data about animals, pets and zoo animals and creates a report about animals, pets and zoo animals.
Your program must be developed following the guidelines previously discussed in class. These guidelines include appropriate variable names, use of comments to describe the purpose of the program and the purpose of each method, and proper use of indentation of all program statements.
Animal.java technical details:
One Constructor
Constructor #1. It will take all the parameters as listed:
int animalID.
String animalType.
double weight.