Question: C: Programming [10 marks This problem uses the classes from the previous problem (Animal and Cat). Write a Java program that uses one command line

 C: Programming [10 marks This problem uses the classes from the

C: Programming [10 marks This problem uses the classes from the previous problem (Animal and Cat). Write a Java program that uses one command line argument (that w always be an integer; you do not need to check this in your c Using the Helper class below, your program will call makeAnimals) to generate an array of size N (where N is the value specified by the command line argument). Your program then print out the name of the animal in the returned list with the loudest noise (longest string). If the animal with the loudest noise is a cat then your program will also print out the number of lives that this cat has left. You can assume that no two animal objects have the same noise level (length of string) public class Helper public tatic Animal [] makeAn imals (int n)( ) /Returns an array of n randomly created animals 4 The animals could be cats, dogs or bats s I/ (each of which extends the Animal class) C: Programming [10 marks This problem uses the classes from the previous problem (Animal and Cat). Write a Java program that uses one command line argument (that w always be an integer; you do not need to check this in your c Using the Helper class below, your program will call makeAnimals) to generate an array of size N (where N is the value specified by the command line argument). Your program then print out the name of the animal in the returned list with the loudest noise (longest string). If the animal with the loudest noise is a cat then your program will also print out the number of lives that this cat has left. You can assume that no two animal objects have the same noise level (length of string) public class Helper public tatic Animal [] makeAn imals (int n)( ) /Returns an array of n randomly created animals 4 The animals could be cats, dogs or bats s I/ (each of which extends the Animal class)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!