Write the class header and the variable declarations for Ath…
Write the class header and the variable declarations for Athlete (an abstract class). All subclasses of Athlete must satisfy the requirements of the Competitive interface. Athlete has the following variables: name (String instance variable) salary (double instance variable) population (int class variable that keeps track of how many athletes exist; make sure it starts at 0) Do not write constructors or methods, just what is asked above. Proper syntax is still required.
Read DetailsWhat is the output of the following code snippet? Assume all…
What is the output of the following code snippet? Assume all necessary imports have been made. If there is a compiler/runtime error, please state which one it is and provide a reason for it. String[] animals = {“bird”, “rat”, “zebra”, “rattlesnake”, “bear”};Arrays.sort(animals);for (String a : animals) { System.out.print(a + ” “);}
Read Details