Do the following program in Java Eclipse:A veterinarian services many pets and their owners. As new pets are added to the population of pets being serviced, their information is entered into a flat text file. Each month, the vet requests a listing of all pets sorted by their outstanding bill balance. You have to write a program to produce a report of animals and their owners sorted by theiroutstanding bill balances from the data in the flat text file. Below is a description of the information on the text file:• The first entry is the number of animals on the file (numeric)• The fields below repeat for each animal:o Owner name (String)o Birth year (numeric)o Bill balance (numeric)o Species (String)o Special feature (numeric or String)The animals serviced by the veterinarian are of four types: mammals, fish, birds, and reptiles.For a mammal, the special feature field on the flat file is the number of legs of the animal (numeric).For a fish, the special feature field is the type, bony, cartilaginous, or jawless (String).For a bird, the special feature field is the fly or walk (String).For a reptile, the special feature field is the blood type, warm-blooded or cold-blooded (String).Program requirements and grading:From the information provided, write a solution that includes the following:• A suitable inheritance hierarchy which represents the pets serviced by theveterinarian. It is up to you how to design the inheritance hierarchy. I suggest an Animal class and appropriate subclasses. For all classes include the following:o Instance variables o Constructors o Accessor and mutator methods o Suitable toString() methods • Write a class xxxx_hw10 which utilizes the following:o An Array of Animal objects o A method which reads the input file provided and stores the objects in the array of Animals. o A method which sorts the array of Animals in ascending order by the balance.o A method that formats and prints the output report. There should bereport headers, one Animal per line and at most 40 Animals per page,o The main method will call all the other methods which will: ▪ Read the text file and store the objects in the array▪ Sort the objects▪ Format and print the report• Test the program so that there are no errors using the input file provided, hw10.txt.• Record your planning time, coding time, testing time and bug fixing time.Include a comment with your name and this information at the top of theprogram.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Do the following program in Java Eclipse:
A veterinarian services many pets and their owners. As new pets are added to the population of pets being serviced, their information is entered into a flat text file. Each month, the vet requests a listing of all pets sorted by their outstanding bill balance. You have to write a program to produce a report of animals and their owners sorted by their
outstanding bill balances from the data in the flat text file. Below is a description of the information on the text file:
• The first entry is the number of animals on the file (numeric)
• The fields below repeat for each animal:
o Owner name (String)
o Birth year (numeric)
o Bill balance (numeric)
o Species (String)
o Special feature (numeric or String)
The animals serviced by the veterinarian are of four types: mammals, fish, birds, and reptiles.
For a mammal, the special feature field on the flat file is the number of legs of the animal (numeric).
For a fish, the special feature field is the type, bony, cartilaginous, or jawless (String).
For a bird, the special feature field is the fly or walk (String).
For a reptile, the special feature field is the blood type, warm-blooded or cold-blooded (String).
Program requirements and grading:
From the information provided, write a solution that includes the following:
• A suitable inheritance hierarchy which represents the pets serviced by the
veterinarian. It is up to you how to design the inheritance hierarchy. I suggest an Animal class and appropriate subclasses.

For all classes include the following:
o Instance variables 
o Constructors 
o Accessor and mutator methods 
o Suitable toString() methods 
• Write a class xxxx_hw10 which utilizes the following:
o An Array of Animal objects 
o A method which reads the input file provided and stores the objects in the array of Animals. 
o A method which sorts the array of Animals in ascending order by the balance.

o A method that formats and prints the output report. There should be
report headers, one Animal per line and at most 40 Animals per page,o The main method will call all the other methods which will: 
▪ Read the text file and store the objects in the array
▪ Sort the objects
▪ Format and print the report
• Test the program so that there are no errors using the input file provided, hw10.txt.
• Record your planning time, coding time, testing time and bug fixing time.
Include a comment with your name and this information at the top of the
program. 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education