Question: Could I please have help with A, B, C, and D? A. (3 points) Given the following code, what is the output? Assume a public

 Could I please have help with A, B, C, and D?

Could I please have help with A, B, C, and D?

A. (3 points) Given the following code, what is the output? Assume a public number instance variable, and an equals() method within the Bus class that uses only this instance variable to check if two Bus objects values' are semantically equal Bus busAnew Bus ); Bus busBnew Bus ); busA.number- 33; I/The 33 is the Florida of PVTA bus routes. busB.number33: System.out.println (busAbusB); System.out.println(busA.equals(busB)) Bus busCbusA busAbusB busA.number43: System.out.println (busAbusC); System.out.println(busA.equals(busc)); busC-busA; System.out.println (busBbusC) System.out.println(busB.equals (busc)); B. (1 point) Suppose you have a single directory on your CLASSPATH, /Users/student/src/. That is, the src directory (located inside student, which is in turn located inside Users directory) is on your classpatlh Suppose the first line of a Java source file named "Bear.java" is: package animals.mammals; Where exactly should this file be located? Specify the full path to the file. For example, a wrong answer is "in /Users/Bear.java". Another wrong answer is /animals/mammals/Bear.java C. (2 points) Suppose we add a file named Eagle.java to the project above, and we want the Eagle class to reside in the animals.birds package. What should the first line (the package declaration) of the Eagle.java file be? And, what should the full path to the file be? D. (1 point) Finally, suppose we want to reference the Eagle class from within the Bear.java source. What import statement must we to add to the Bear.java file? If none is necessary, say so

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!