IDL Constructed Types   «Prev 

Structs Weather Report Mapping

1) The IDL struct WeatherReport is mapped to a corresponding Java class
// WeatherReport.java:
package Module4;
public final class WeatherReport implements org.omg.CORBA.portable.IDLEntity{
  public short high;
  public short low;
  public java.lang.String forecast;
  public WeatherReport(){}
  public WeatherReport(short high, short low, java.lang.String forecast){
    this.high= high;
    this.low= low;
    this.forecast=foreast;
  }
}
The IDL struct WeatherReport is mapped to a corresponding Java class

2) The high member of the struct is mapped to a public field and argument to the full constructor
The high member of the struct is mapped to a public field and an argument to the full constructor.

The forecast member of the struct is mapped to a public field and an argument to the full constructor
//WeatherReport.java
package Module4;
public final class WeatherReport implements org.omg.CORBA.portable.IDLEntity
The forecast member of the struct is mapped to a public field and an argument to the full constructor