Limited access

Upgrade to access all content for this subject

Which of the following segments of code show the proper way of defining an interface and a class that uses the interface?

A
public interface Restaurant 
{     // data and methods not shown  }

public class FastFoodRestaurant implements Restaurant 
{     // data and methods not shown  }
B
public interface Restaurant 
{     // data and methods not shown  }

public class FastFoodRestaurant extends Restaurant 
{     // data and methods not shown  }
C
public class Restaurant 
{     // data and methods not shown  }

public interface FastFoodRestaurant extends Restaurant 
{     // data and methods not shown  }
D
public class Restaurant 
{     // data and methods not shown  }

public interface FastFoodRestaurant implements Restaurant 
{     // data and methods not shown  }
E
public interface Restaurant 
{     // data and methods not shown  }

public interface FastFoodRestaurant extends Restaurant 
{     // data and methods not shown  }
Select an assignment template