, , , z, - . 1 20. (a, b, c, d) (. )
. , I, J, a, b, c, d, z .
, , . , .
, , z, . 20.
2.1
Java. , (Windows, Linux, Mac OS , Solaris).
Java ++ . ( .).
Java 2 (Graphics User Interface). Abstract Windows Toolkit (AWT) Swing. AWT , . , Swing .
(Container). JFrame ( JWindows JApplet). JFrame , :
setBounds(x, y, w, h) - , .
setResizable(bool) - , .
setTitle(str) - .
setVisible(bool) - .
setDefaultCloseOperation(operation) - , .
:
JLabel - ;
JTextField - edit-box;
JButton - (button);
JCheckBox - ( checkbox);
JRadioButton -
, .
- LayoutManager. LayoutManager' .
FlowLayout - . , .
GridLayout - .
BorderLayout - 5 . : North, South, East, West, Center.
|
|
BoxLayout - .
GridBagLayout - . , .
. Event Listeners.
private int i = 0, u = 0;
private double[][] CONST = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
private int[][] POWx = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
POWy = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
POWz = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
private double A = 0;
private double B = 0;
private double C = 0;
private double D = 0;
private double Z = 0;
i,u .
CONST .
POWx , POWy, POWz.
A, B, C, D, Z
0, , .
private double result = 0;
, , .
:
IntegralFrame, MathText, Main.
IntegralFrame:
btnResultEventListener, monomBoxActionListener,
polinomBoxActionListener, btnOkActionListener,
AnalyticalCalculation.
, .
monomBoxActionListener 20
polinomBoxActionListener 2
btnOkActionListener btn ( )
AnalyticalCalculation , .
btnResultEventListener btnResult. AnalyticalCalculation, .
MathText - , pwr() , .
Main , IntegralFrame, .