You have been hired by a veterinarian's office to begin automating patient records. Create an Animal...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You have been hired by a veterinarian's office to begin automating patient records. Create an Animal class which contains the animal's name, weight in lbs., type (a String such as "dog", "cat", etc.) and owner's name. Include appropriate methods including a toString instance method. Next, create a Dog subclass of the Animal class, which also includes the dog's breed (as a String). All Dog objects should have a type of "dog". Write an implementation class to demonstrate your classes by repeatedly allowing the user to input the details for an Animal and then displaying the information about that animal, nicely formatted. You do not need to store more than one Animal at a time for this lab. (Note that if the user indicates the animal is a dog, they should be prompted for the breed, and a Dog object should be created rather than a generic Animal object.) Note that because of lab time constraints, you do not need to validate the input. You may assume the user provides correct input. You have been hired by a veterinarian's office to begin automating patient records. Create an Animal class which contains the animal's name, weight in lbs., type (a String such as "dog", "cat", etc.) and owner's name. Include appropriate methods including a toString instance method. Next, create a Dog subclass of the Animal class, which also includes the dog's breed (as a String). All Dog objects should have a type of "dog". Write an implementation class to demonstrate your classes by repeatedly allowing the user to input the details for an Animal and then displaying the information about that animal, nicely formatted. You do not need to store more than one Animal at a time for this lab. (Note that if the user indicates the animal is a dog, they should be prompted for the breed, and a Dog object should be created rather than a generic Animal object.) Note that because of lab time constraints, you do not need to validate the input. You may assume the user provides correct input.
Expert Answer:
Answer rating: 100% (QA)
Heres a Java implementation of the Animal class and its Dog subclass along with an implementation cl... View the full answer
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these programming questions
-
International banks provide various services to its clients. The types of services provided by international banks is what differentiates it from a domestic bank. Understanding these banks and the...
-
To demonstrate the ability to propose, implement, and query the database. Problem: MovinOn Inc. is a moving company that provides moving and storage services in California, Nevada, and Arizona....
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The extraction process shown Figure 8.47 is conducted without extract or raffinate reflux. Feed F' is composed of solvent and solute, and is an extract-phase feed. Feed F'' is composed of unextracted...
-
A 10-m high cylinder, cross-sectional area 0.1 m2, has a mass less piston at the bottom with water at 20oC on top of it. Air at 300 K, volume 0.3 m3, under the piston is heated so that the piston...
-
In Bylund's article, there is the quote "To a nation built on immigration it should seem strange to have a president investing in keeping foreigners out, and considering fines on employers hiring...
-
Does structural modeling represent classes or objects?
-
As Jacob walked back to his office after the weekly financial meeting, he reviewed his notes and saw that he had written down two operating income numbers: $110,000 and $50,000. He knew that the...
-
Aloha Inc. has 7 percent coupon bonds on the market that have 12 years left to maturity. If the YTM on these bonds is 8.1 percent, what is the current bond price?
-
Kicking It Corp. is planning to open a football camp in Arizona, which will require a land purchase and facilities development that includes fields, sleeping and dining facilities, maintenance...
-
Note 3 describes Cisco's 2013 acquisition of NDS Group Limited (NDS") for cash totaling $5,005 million and reports the allocation of the purchase price to specific asset and liability accounts. i....
-
Calculate the Gibbs energy of formation of NH3 at 1000 K. Remember that the Gibbs energies of formation of the elements are still zero at this temperature.
-
You are the auditor of John Benson Ltd., a manufacturer of a variety of paper and cardboard stationery products. Product lines range from everyday items that are low value but high volume to more...
-
Identify the audit risks associated with the installation of the new IT system for patient revenue for Gardens Nursing Home. Fellowes and Associates Chartered Professional Accountants is a successful...
-
Consider two mutual funds for investment. Fund 1 is a bond fund with 5% average return and 10% standard deviation (STD) risk. Fund 2 is a stock fund with 10% average return and 15% STD risk. The...
-
Answer the following question based on the information presented for Cloud 9 in Appendix A of this book and in the current and earlier chapters. You should also consider your answers to the case...
-
Write a program for a basic calculator (Using Switch Only) Your calculator should take two integers. Then it should display options for different operations and then ask the user for choice. Based on...
-
Carlton Stokes owns and operates a car-detailing business named SuperShine & Detailing. For $150, Carltons business will hand wash and wax customers cars, vacuum the interior, and thoroughly clean...
-
Graham owns a building having a fair market value of $120,000. She takes out a fire insurance policy from the Bentley Insurance Company for $72,000; the policy contains an 80 percent co-insurance...
-
Webster, Inc., dealt in automobile accessories at wholesale. Although he manufactured a few items in his own factory, among them windshield wipers, Webster purchased most of his inventory from a...
-
Anita and Duncan had been partners for many years in a mercantile business. Their relationship deteriorated to the point at which Anita threatened to bring an action for an accounting and dissolution...
-
1. Describe the bases of power held by Dr. Jamie Thompson. Describe the bases of power held by Dr. Elizabeth Clarke. 2. What activities and people have contributed to Jaime Thompsons power? What...
-
What is the current in the wire in Figure Q22.1? 1.0 VR + 1.0-1.0V + FIGURE Q22.1
-
Electroconvulsive therapy is a last-line treatment for certain mental disorders. In this treatment, an electric current is passed directly through the brain, inducing seizures. The total charge that...
Study smarter with the SolutionInn App