Size: 1158
Comment:
|
Size: 676
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 7: | Line 7: |
|| Declaring a class type || public class CalcComplexPlotApp implements Calculation { private Control myControl; private DrawingPanel drawingPanel = new DrawingPanel(); private DrawingFrame drawingFrame = new DrawingFrame(drawingPanel); private GridPointData pointdata; private ComplexSurfacePlot plot; private MultiVarFunction reFun, imFun; || class CalcComplexPlotApp(Calculation): def __init__(self): self.myControl = Control self.drawingPanel = DrawingPanel() self.drawingFrame = DrawingFrame(self.drawingPanel) self.pointdata = GridPointData self.plot = ComplexSurfacePlot self.reFun = MultiVarFunction self.imFun = MultiVarFunction || |
|| Declaring a class type || public class CalcComplexPlotApp implements Calculation { <<BR>> private Control myControl;<<BR>> || class CalcComplexPlotApp(Calculation): <<BR>> def __init__(self): <<BR>> self.myControl = Control <<BR>> || |
Describe ComparisonJavaJython here.
Description |
In Java |
In Jython |
array of doubles |
xCoord = Double[25] |
xCoord = jarray.zeros(25, "d") |
Size of array |
mx = data.length; |
mx = len(data) |
array assignment |
double re = reFun.evaluate(new double[] {data[i][j][0], data[i][j][1]}); |
re = self.reFun.evaluate([data[i][j][0], data[i][j][1]]) |
Declaring a class type |
public class CalcComplexPlotApp implements Calculation { |
class CalcComplexPlotApp(Calculation): |