subject

Aveterinarian 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 two types: mammals and non-mammals. for a mammal the special feature field on the flat file is the number of legs of the animal (numeric). for a non-mammal 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 instancevariables

o constructors

o access or and mutator methods

o suitable tostring() methods

write a class _program7 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 the input file provided, program7.txt, to test your program.

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 one a nimal per line and at most 40 animals per page,

o the main metho d 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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
question
Computers and Technology, 24.06.2019 07:20
3pointsyou've found an image you want to insert into your slide presentation. youwant to make the image look more gray so that it looks like an older imagewhat would you need to adjust? 0.00o a. sizeo b. hueo c. contrasto d. tones
Answers: 2
You know the right answer?
Aveterinarian services many pets and their owners. as new pets are added to the population of pets b...
Questions
question
English, 18.04.2020 20:12
question
Mathematics, 18.04.2020 20:15
Questions on the website: 13722363