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, 21.06.2019 22:00
What is the most important aspect of marking media? a. data labelingb. content descriptionc. electronic labelingd. classification
Answers: 2
question
Computers and Technology, 22.06.2019 20:10
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
You have read about the beginnings of the internet and how it was created. what was the internet originally created to do? (select all that apply) share research. play games. communicate. share documents. sell toys
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the can apple do to fix this issue?
Answers: 1
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
Mathematics, 12.11.2020 02:50
question
Mathematics, 12.11.2020 02:50
question
English, 12.11.2020 02:50
question
Mathematics, 12.11.2020 02:50
question
Mathematics, 12.11.2020 02:50
question
Mathematics, 12.11.2020 02:50
question
Social Studies, 12.11.2020 02:50
question
Mathematics, 12.11.2020 02:50
question
Mathematics, 12.11.2020 02:50
Questions on the website: 13722361