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.

Question
Asked Nov 18, 2019
174 views

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. 

check_circle

Expert Answer

star
star
star
star
star
1 Rating
Step 1

Program Instructions:

  • Create a java program in eclipse and import all required modules.
  • Now create a method in ‘xxx_hw10’ class, which will get the number of array elements from ‘.txt’ file and returns to the ‘main’ method. And reads all file data in an array....

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in

Engineering

Computer Science

Java

Related Computer Science Q&A

Find answers to questions asked by student like you

Show more Q&A add
question_answer

Q: How do I start creating a program to shuffle and deal a deck of cards?  The program should consist o...

A: Program:Filename: Game.java package deckOfCards;import java.util.Scanner;public class Game {public s...

question_answer

Q: Write a loop that reads positive integers from standard input and that terminates when it reads an i...

A: To check the condition that the number is positive and print the sum, count of even and odd integers...

question_answer

Q: How does data mining impact personal privacy and security?

A: Data mining:Data mining is a process to explore and analyze new, unsuspected, previously unknown and...

question_answer

Q: In Python  Use the Design Recipe to write a function weave, which consumes two strings of the same l...

A: write a function named weave in python.This function takes two strings of the same length.This funct...

question_answer

Q: Write a system calls your program is allowed to use: fprintf(), open(), fgets(), and fclose(). Do no...

A: System calls:A system call can be defined as a request to do something to the operating system on be...

question_answer

Q: Arrays Write three statements to print the first three elements of array runTimes. Follow each state...

A: Note: As the user given index value is constant and so the value of index will not be changed while ...

question_answer

Q: This program is written in pseudocode."Design a program that generates a 7-ddigit lottery number. Th...

A: As you have not specified the programming language, we have solved this question using C++ programmi...

question_answer

Q: Consider the sender A transmits 12 data packets to B using stop wait 3rd packet is lost while transm...

A: In stop wait protocol, both the sender and receiver have a windows size of one. The lost packets in ...

question_answer

Q: when an orginization undertakes an infosec-driven review of job descriptions, which job descriptions...

A: Information security: Data security(Infosec) is data assurance inside the association; it oversees i...