Answer to Question #261812 in Java | JSP | JSF for zenna

Question #261812

Write the code below for the two interfaces described given the rules below. 


The Network has two methods called connect and disconnect. The connect method takes a String argument called networkName and returns a boolean. The disconnect method returns a boolean and takes no arguments. 


The Ethernet interface inherits from the Network interface and adds two methods: plug and unPlug. The plug method takes an integer as argument called port and returns a boolean. The unPlug method returns a boolean and takes not arguments.


1
Expert's answer
2021-11-05T18:00:29-0400
public interface Network {
    boolean connect(String networkName);
    boolean disconnect();
}


public interface Ethernet extends Network{
    boolean plug(int port);
    boolean unPlug();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS