Create application kennel that instantiates two dog objects


Problem

A. Create a class called Dog that contains instance data that represents the dog's name as a String and weight in pounds, as a double. In addition, the class should have the following methods:

a) A default constructor, which initializes name to "dog" and weight to 0

b) A getter for each instance data

c) A setter for each instance data

d) A method toKgs() that computes and returns the weight of the dog in kilograms (1lb = 0.453592 kg).

e) A toString() method that returns a one-line description of the dog including name and weight.

B. Create an application Kennel that instantiates two Dog objects and updates the names and weights with data from the user. The program will display the information about each object (Hint: toString() method) as well as the average weight in kilograms.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Create application kennel that instantiates two dog objects
Reference No:- TGS03242083

Expected delivery within 24 Hours