Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Java Question 35 Write the code that will implement an interface: Common_animal

ID: 3601905 • Letter: J

Question

Java

Question

35 Write the code that will implement an interface: Common_animal organ for a new found species class name: New species In the new class: New_species_1, and you found that it has a very different organ which is not listed in can you add a new method to describe the unknown organ? ANS (2) 1. ANS (1) ANS (1) ANS (2: circle Yes or No You found the newly implemented class does not contain all the require methods, can you write additional methods in the new class? ANS (2) ANS (1): Cycle Yes No ANS (2): Cycle Yes No 36 To implement an interface called: Car, for a class called: Truck, do you have to implement all emplty methods listed in the interface? ANS( ANS (1) ANS (2) 37 Can a class implement more than one interface? Can a class extends more than one super class? ANS (1): circle Yes or No When you implement an interface, can you skip any methods in the interface that you have no use in the implemented class? ANS (2): circle Yes or No ANS (I) ANS (2) 38 When you implement an interface, can you add more methods in the implemented class? ANS (1): circle ANS (2): circle Yes or No Yes or No uhich of the folloving ines ae lrgal and which are illeeal? The class Undergraduate is a derived class of Student, and Student is

Explanation / Answer

Hi,

Ans 35 -
Ans i) - interface Common_animal_organ {
public void eat();
public void travel();
}

public class New_species_1 implements Common_animal_organ {

public void eat() {
System.out.println("Animal eats");
}

public void travel() {
System.out.println("Animal travels");
}

public int newOrgan() {
System.out.println("This animal has new Organ");
}

public static void main(String args[]) {
New_species_1 m = new New_species_1();
m.eat();
m.travel();
}
}

Ans ii) Yes

Ans 36 -
Ans i) No
Ans ii) Yes

Ans 37 -
Ans i) Yes
Ans ii) No

Ans 38 -

Ans i) Yes
Ans ii) Yes

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote