IDL interface inheritance mapping - Quiz Explanation

The answers you selected are indicated below, along with text that explains the correct answers.
 
1. Which answer is the operations interface that would be generated for the Heat Warning Weather Service in the following IDL?
module weather
{
 interface WeatherService
     {
  string getReport(in string city);
     };
 interface HeatWarningWeatherService:WeatherService
 {
  boolean issueWarning(in string city);
 };
};

Please select the best answer.
  A.
package weather;
public interface HeatWarningWeatherServiceOperations
 extends weather.WeatherService
{
 public boolean issueWarning(java.lang.String city);
}
  B.
package weather;
public interface HeatWarningWeatherServiceOperations
 extends weather.WeatherServiceOperations
{
 public java.lang.String getReport(java.lang.String city);
public boolean issueWarning(java.lang.String city); }
  C.
package weather;
public interface HeatWarningWeatherServiceOperations
 extends weather.WeatherServiceOperations
{
 public boolean issueWarning(java.lang.String city);
}
  The correct answer is C. The child operations interface extends the parent operations interface, and each interface has only those methods mapped from their own operations. A is incorrect because it shows an operations interface extending a signature interface, and operations interfaces in fact extend only operations interfaces. B is incorrect because it shows the child with a method that should be inherited from the parent. Each operations interface has only the methods corresponding to the operations in the IDL interface from which the operations interface was generated, methods from parents are inherited, thus, they do not need to be declared.

2. Which answer is the signature interface that would be generated for the Heat Warning Weather Service in the following IDL?
module weather
{ 
 interface WeatherService
     {
  string getReport(in string city);
     };
 interface HeatWarningWeatherService:WeatherService
 {
  boolean issueWarning(in string city);
 };
};

Please select the best answer.
  A.
package weather;
public interface HeatWarningWeatherService
 extends HeatWarningWeatherServiceOperations, 
  org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity,
weather.WeatherService
{
}
  B.
package weather;
public interface HeatWarningWeatherService
 extends HeatWarningWeatherServiceOperations, 
  org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity,
weather.WeatherService
{
 public boolean issueWarning(java.lang.String city);
}
  C.
package weather;
public interface HeatWarningWeatherService
 extends HeatWarningWeatherServiceOperations, 
  org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity,
weather.WeatherServiceOperations
{
}
  The correct answer is A. A is correct because the signature interface for the child IDL interface inherits from the signature interface for its parent IDL interface, and also inherits from the operations interface for the child IDL interface. B is incorrect because the signature interface never declares operations itself, it always inherits them from the corresponding operations interface. C is incorrect because it shows the signature interface for the child IDL interface inheriting from the operations interface for the parent IDL interface, when it should inherit from the signature interface for the parent IDL interface.

3. Which answer is the operations interface that would be generated for the Heat Warning Weather Service in the following IDL? module weather
{ 
 interface WeatherService
     {
  string getReport(in string city);
     };
 interface HeatWarningWeatherService:WeatherService
 {
  readonly attribute double warningThreshold;
  boolean issueWarning(in string city);
 };
};

Please select the best answer.
  A.
package weather;
public interface HeatWarningWeatherServiceOperations
 extends weather.WeatherServiceOperations
{
 public boolean issueWarning(java.lang.String city);
}
  B.
package weather;
public interface HeatWarningWeatherServiceOperations
 extends weather.WeatherService
{
 public double warningThreshold();
 public boolean issueWarning(java.lang.String city);
  C.
}
package weather;
public interface HeatWarningWeatherServiceOperations
 extends weather.WeatherServiceOperations
{
 public double warningThreshold();
 public boolean issueWarning(java.lang.String city);
}
  The correct answer is C. C is correct because the operations interface for the child IDL interface inherits from the operations interface for the parent IDL interface and has all the methods mapped from the child IDL interface including the accessor produced for the readonly attribute. A is incorrect because it is missing the method generated for the attribute. B is incorrect because it shows the operations interface for the child IDL interface inheriting from the signature interface for the parent IDL interface. Operations interfaces inherit from operations interfaces, and signature interfaces inherit from signature interfaces.