Mapping Clients  «Prev  Next»

Operations Interface Mapping - Quiz

Each question is worth one point. Select the best answer for each question.
 
1. What Java operations interface is produced by the following IDL?
module weather
{ 
 interface WeatherService
     {
  attribute long citiesCovered;
  string getReport(in string city);
     };
};

Please select the best answer.
  A.
package weather;
public interface WeatherServiceOperations
{
 public java.lang.String getReport(java.lang.String city);
}

  B.
package weather;
public interface WeatherServiceOperations
{
 public int citiesCovered();
 public void citiesCovered(int arg);
 public java.lang.String getReport(java.lang.String city);
}

  C.
package weather;
public interface WeatherServiceOperations
{
 public long citiesCovered();
 public void citiesCovered(long arg);
 public java.lang.String getReport(java.lang.String city);
}


2. What Java operations interface will be produced by the following IDL?
module weather
{ 
 interface WeatherService
     {
  string getReport(in string city, out long temperature);
     };
};

Please select the best answer.
  A.
package weather;
public interface WeatherServiceOperations
{
 public java.lang.String getReport(java.lang.String city,
  int temperature);
}

  B.
package weather;
public interface WeatherServiceOperations
{
 public java.lang.String getReport(java.lang.String city,
  org.omg.CORBA.LongHolder temperature);
}

  C.
package weather;
public interface WeatherServiceOperations
{
 public java.lang.String getReport(java.lang.String city,
  org.omg.CORBA.IntHolder temperature);
}

3. What Java operations interface will be produced by the following IDL?
module weather
{ 
 interface WeatherService
     {
  const string tempUnits = "farenheit";
  string getReport(in string city);
     };
};

Please select the best answer.
  A.
package weather;
public interface WeatherServiceOperations
{
 public java.lang.String getReport(java.lang.String city);
}

  B.
package weather;
public interface WeatherServiceOperations
{
 public java.lang.String getReport(java.lang.String city);
 java.lang.String tempUnits = "farenheit";
}

  C.
package weather;
public interface WeatherServiceOperations
{
 public java.lang.String getReport(java.lang.String city);
 java.lang.String getTempUnits();
}

Correct answers:

Your Score: 0