Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Submit a JAVA document. And also MS Word document containing the source code and Screen captures of the output. In the advanced animal tracking system

Submit a JAVA document. And also MS Word document containing the source code and Screen captures of the output.
In the advanced animal tracking system for FunWorld Zoo, create a Java class named AdvancedANIMAL with the following features:
Data Attributes:
String AName (Animal Name)
String AID (Animal ID)
String Description
int Age
double Weight
ArrayList vaccinations (a list to store the names of vaccinations received)
Methods:
Implement a method named addVaccination(String vaccineName) that adds the name of a vaccination to the list.
Implement a method named displayVaccinations() that displays the list of vaccinations for the animal.
Implement a static method named averageWeight(ArrayList animals) that calculates and returns the average weight of a list of animals.
Constructor:
Implement a constructor that initializes the data attributes.
Object Creation and Demonstration:
Create THREE AdvancedANIMAL objects with data of your choice.
Add vaccinations to each animal using the addVaccination() method.
Display the vaccinations for each animal using the displayVaccinations() method.
Calculate and display the average weight of the three animals using the averageWeight() method.
Marks Distribution:
Define the AdvancedANIMAL class with extended data attributes and methods: 7 marks
Implement the constructor: 3 marks
Demonstrate the usage of methods and object creation: 5 marks
Submit a JAVA document. And also MS Word document containing the source code and Screen captures of the output.

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

More Books

Students also viewed these Databases questions