can you please tell me what is the wrong with this java code??
public class MainFrame { public int OrgPnt1_X; public int OrgPnt1_y; public int OrgPnt2_x; public int OrgPnt2_y; public int H_Magnitude; public int V_Magnitude; MainFrame(int horz_dim, int vert_dim) { H_Magnitude=horz_dim; V_Magnitude=vert_dim; OrgPnt1_X=0; OrgPnt1_y=0; OrgPnt2_x=horz_dim; OrgPnt2_y=vert_dim; } public void setSize(int dim1, int dim2) { H_Magnitude=dim1; V_Magnitude=dim2; } public void defineWorkGrid(int pnt1x, int pnt1y,int Pnt2x, int Pnt2y) { if ( (OrgPnt1_X > OrgPnt2_X) || (OrgPnt1_Y > OrgPnt2_Y ) ) { OrgPnt1_X=Pnt2x; OrgPnt1_y=Pnt2y; OrgPnt2_X=pnt1x; OrgPnt2_y=pnt1y; } if((OrgPnt1_X==OrgPnt2_x) && (OrgPnt1_Y > OrgPnt2_y) ) { OrgPnt1_X=0 ; OrgPnt1_Y=0 ; OrgPnt2_X=Pnt2x ; OrgPnt2_Y=Pnt2y ; } else { OrgPnt1_X=pnt1x; OrgPnt1_Y=pnt1y; OrgPnt2_X=Pnt2x; OrgPnt2_Y=Pnt2y; } }//end of the method }// end of the class class SubFrame extends MainFrame { SubFrame(int horz_dim, int vert_dim) { super(horz_dim,vert_dim); } }// end of the class
the error message reads the following:
--------------------Configuration: <Default>--------------------
D:\javafiles\MainFrame.java:27: cannot find symbol
symbol : variable OrgPnt2_X
location: class MainFrame
if ( (OrgPnt1_X > OrgPnt2_X) || (OrgPnt1_Y > OrgPnt2_Y ) )
^
D:\javafiles\MainFrame.java:27: cannot find symbol
symbol : variable OrgPnt1_Y
location: class MainFrame
if ( (OrgPnt1_X > OrgPnt2_X) || (OrgPnt1_Y > OrgPnt2_Y ) )
^
D:\javafiles\MainFrame.java:27: cannot find symbol
symbol : variable OrgPnt2_Y
location: class MainFrame
if ( (OrgPnt1_X > OrgPnt2_X) || (OrgPnt1_Y > OrgPnt2_Y ) )
^
D:\javafiles\MainFrame.java:31: cannot find symbol
symbol : variable OrgPnt2_X
location: class MainFrame
OrgPnt2_X=pnt1x;
^
D:\javafiles\MainFrame.java:34: cannot find symbol
symbol : variable OrgPnt1_Y
location: class MainFrame
if((OrgPnt1_X==OrgPnt2_x) && (OrgPnt1_Y > OrgPnt2_y) )
^
D:\javafiles\MainFrame.java:37: cannot find symbol
symbol : variable OrgPnt1_Y
location: class MainFrame
OrgPnt1_Y=0 ;
^
D:\javafiles\MainFrame.java:38: cannot find symbol
symbol : variable OrgPnt2_X
location: class MainFrame
OrgPnt2_X=Pnt2x ;
^
D:\javafiles\MainFrame.java:39: cannot find symbol
symbol : variable OrgPnt2_Y
location: class MainFrame
OrgPnt2_Y=Pnt2y ;
^
D:\javafiles\MainFrame.java:44: cannot find symbol
symbol : variable OrgPnt1_Y
location: class MainFrame
OrgPnt1_Y=pnt1y;
^
D:\javafiles\MainFrame.java:45: cannot find symbol
symbol : variable OrgPnt2_X
location: class MainFrame
OrgPnt2_X=Pnt2x;
^
D:\javafiles\MainFrame.java:46: cannot find symbol
symbol : variable OrgPnt2_Y
location: class MainFrame
OrgPnt2_Y=Pnt2y;
^
11 errors
Process completed.