A. Design a class named Animal that contains the following: [2.5 POINTS] • two private instance variables: name of type
Posted: Fri Jun 10, 2022 11:56 am
A. Design a class named Animal that contains the following: [2.5 POINTS] • two private instance variables: name of type string and price of type double. • parameterized constructor to initialize the two instance variables. • Getter and setter methods for the two instance variables. B. Design a demo class named PetShop that has the main method. In the main method, do the following: [2.5 POINTS] a. create 50 Animal objects and ask the user to input the details of each Animal. b. find and print the Animal that has largest cost c. find and print the average price of all animals. //paste your code below this line