L.1
LAMPIRAN A: LISTING PROGRAM
A.1
Form Menu Utama (Main Menu) Delphi 7.0
unit uMenu; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TfrmMenu = class(TForm) Label1: TLabel; Button2: TButton; Button3: TButton; Button4: TButton; Label2: TLabel; procedure Button1Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Button3Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmMenu: TfrmMenu; implementation uses uCompany, uInfo, uMarket; {$R *.dfm} procedure TfrmMenu.Button1Click(Sender: TObject); begin frmCompany.show;
L.2 self.Hide; end; procedure TfrmMenu.Button4Click(Sender: TObject); begin application.Terminate; end; procedure TfrmMenu.FormClose(Sender: TObject; var Action: TCloseAction); begin application.Terminate; end; procedure TfrmMenu.Button3Click(Sender: TObject); begin frmInfo.show; self.Hide; end; procedure TfrmMenu.Button2Click(Sender: TObject); begin frmMarket.show; frmMenu.Hide; end; end.
A.2
Form Menu Traditional Market Analysis Delphi 7.0
unit uMarket; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TfrmMarket = class(TForm) Label1: TLabel; Label2: TLabel; Label9: TLabel; cbSum: TComboBox; GroupBox1: TGroupBox; ed11: TEdit;
L.3 ed12: TEdit; ed13: TEdit; ed14: TEdit; ed21: TEdit; ed22: TEdit; ed23: TEdit; ed24: TEdit; ed31: TEdit; ed32: TEdit; ed33: TEdit; ed34: TEdit; ed41: TEdit; ed42: TEdit; ed43: TEdit; ed44: TEdit; GroupBox2: TGroupBox; Label3: TLabel; edx11: TEdit; edx12: TEdit; edx13: TEdit; edx14: TEdit; edn1: TEdit; GroupBox3: TGroupBox; lbl1: TLabel; lbl2: TLabel; lbl3: TLabel; lbl4: TLabel; cbtreatment1: TComboBox; GroupBox4: TGroupBox; Label8: TLabel; edx21: TEdit; edx22: TEdit; edx23: TEdit; edx24: TEdit; edn2: TEdit; GroupBox5: TGroupBox; Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; Button5: TButton; Button6: TButton; cbtreatment2: TComboBox; cbtreatment3: TComboBox; cbtreatment4: TComboBox; edname1: TEdit; Label4: TLabel;
L.4 edname2: TEdit; Label5: TLabel; procedure Button6Click(Sender: TObject); procedure Button5Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure cbSumChange(Sender: TObject); procedure edx11KeyPress(Sender: TObject; var Key: Char); procedure edn1KeyPress(Sender: TObject; var Key: Char); procedure ed12Change(Sender: TObject); procedure ed13Change(Sender: TObject); procedure ed14Change(Sender: TObject); procedure ed23Change(Sender: TObject); procedure ed24Change(Sender: TObject); procedure ed34Change(Sender: TObject); function validasi:boolean; private { Private declarations } public { Public declarations } end; var frmMarket: TfrmMarket; implementation uses uHelp, uGraph, uMenu, uParalel, uSqueeze, uTest; {$R *.dfm} function TfrmMarket.validasi:boolean; var n:integer; begin n:=strtoint(cbSum.Text); if (ed11.Text = '') or (ed12.Text = '') or ((ed13.Text = '') and (n>=3)) or ((ed14.Text = '') and (n=4)) or (ed22.Text = '') or ((ed23.Text = '') and (n>=3)) or ((ed24.Text = '') and (n=4)) or ((ed33.Text = '') and (n>=3)) or ((ed34.Text = '') and (n=4)) or ((ed44.Text = '') and (n=4)) then begin
L.5 MessageDlg('Elemen Covariance dilengkapi',mterror,[mbOk],0); validasi := false; end else
Matrix
belum
lengkap,
harap
if (edname1.Text='') or (edn1.Text = '') or (edx11.Text = '') or (edx12.Text = '') or ((edx13.Text = '') and (n>=3)) or ((edx14.Text = '') and (n=4)) then begin MessageDlg('Data untuk Group 1 belum lengkap, harap dilengkapi',mterror,[mbOk],0); validasi := false; end else if (edname2.Text='') or (edn2.Text = '') or (edx21.Text = '') or (edx22.Text = '') or ((edx23.Text = '') and (n>=3)) or ((edx24.Text = '') and (n=4)) then begin MessageDlg('Data untuk Group 2 belum lengkap, harap dilengkapi',mterror,[mbOk],0); validasi := false; end else begin if n<3 then begin ed13.Text := '0'; ed23.Text := '0'; ed33.Text := '0'; ed31.Text := '0'; ed32.Text := '0'; edx13.Text := '0'; edx23.Text := '0'; end; if n<4 then begin ed14.Text := '0'; ed24.Text := '0'; ed34.Text := '0'; ed44.Text := '0'; ed41.Text := '0'; ed42.Text := '0'; ed43.Text := '0'; edx14.Text := '0'; edx24.Text := '0'; end; validasi := true; end; end; procedure TfrmMarket.Button6Click(Sender: TObject); begin application.Terminate;
L.6 end; procedure TfrmMarket.Button5Click(Sender: TObject); begin frmHelp.showModal; end; procedure TfrmMarket.Button1Click(Sender: TObject); var max:real; a:integer; begin if validasi = false then exit; with frmGraph do begin sumber.Caption := 'Market'; label3.visible := false; label4.visible := false; label13.Visible := false; label14.Visible := false; label23.Visible := false; label24.Visible := false; shape13.Visible := false; shape14.Visible := false; shape23.Visible := false; shape24.Visible := false; shape4.Visible := false; shape5.Visible := false; if strtoint(cbSum.Text) >= 3 then begin label3.visible := true; label13.Visible := true; label23.Visible := true; shape13.Visible := true; shape23.Visible := true; shape4.Visible := true; end; if strtoint(cbSum.Text) = 4 then begin label4.visible := true; label14.Visible := true; label24.Visible := true; shape14.Visible := true; shape24.Visible := true; shape5.Visible := true; end;
L.7 label1.Caption := cbTreatment1.Text; label2.Caption := cbTreatment2.Text; label3.Caption := cbTreatment3.Text; label4.Caption := cbTreatment4.Text; max:=0; if round(strtofloat(edx11.Text))>max then max := strtofloat(edx11.Text); if round(strtofloat(edx12.Text))>max then max := strtofloat(edx12.Text); if round(strtofloat(edx13.Text))>max then max := strtofloat(edx13.Text); if round(strtofloat(edx14.Text))>max then max := strtofloat(edx14.Text); if round(strtofloat(edx21.Text))>max then max := strtofloat(edx21.Text); if round(strtofloat(edx22.Text))>max then max := strtofloat(edx22.Text); if round(strtofloat(edx23.Text))>max then max := strtofloat(edx23.Text); if round(strtofloat(edx24.Text))>max then max := strtofloat(edx24.Text); a:=round((shape1.Height / max)) - 2;
label11.top := shape1.Height -round(strtofloat(edx11.Text)*a); label12.top := shape1.Height -round(strtofloat(edx12.Text)*a); label13.top := shape1.Height -round(strtofloat(edx13.Text)*a); label14.top := shape1.Height -round(strtofloat(edx14.Text)*a); label21.top := shape1.Height -round(strtofloat(edx21.Text)*a); label22.top := shape1.Height -round(strtofloat(edx22.Text)*a); label23.top := shape1.Height -round(strtofloat(edx23.Text)*a); label24.top := shape1.Height -round(strtofloat(edx24.Text)*a);
shape11.Top := label11.Top; shape12.Top := label12.Top; shape13.Top := label13.Top; shape14.Top := label14.Top; shape21.Top := label21.Top; shape22.Top := label22.Top; shape23.Top := label23.Top; shape24.Top := label24.Top; shape11.Left := 44; shape12.Left := shape11.Left; shape13.Left := shape11.Left; shape14.Left := shape11.Left; shape21.Left := shape11.Left; shape22.Left := shape11.Left; shape23.Left := shape11.Left; shape24.Left := shape11.Left; {
L.8 label11.caption := edx11.Text; label12.caption := edx12.Text; label13.caption := edx13.Text; label14.caption := edx14.Text; label21.caption := edx21.Text; label22.caption := edx22.Text; label23.caption := edx23.Text; label24.caption := edx24.Text; } ShowModal; end; end; procedure TfrmMarket.FormClose(Sender: TObject; var Action: TCloseAction); begin self.Hide; frmMenu.show; end; procedure TfrmMarket.Button2Click(Sender: TObject); begin if validasi = false then exit; with frmParalel do begin sumber.Caption := 'Market'; edv1.Text := inttostr(strtoint(cbSum.Text)-1); edv2.Text := inttostr(strtoint(edn1.Text) + strtoint(edn2.Text) strtoint(cbSum.Text)); memo1.Clear; memo1.Text := 'Name of group 1 = '+edName1.Text + ' dengan jumlah sample = '+edn1.Text+'('+edx11.Text+' '+edx12.Text; if edx13.Visible = true then memo1.Text := memo1.Text + ' '+edx13.Text; if edx14.Visible = true then memo1.Text := memo1.Text + ' '+edx14.Text; memo1.Text := memo1.Text + ')'+#13+#10; memo1.Text := memo1.Text + 'Name of group 2 = '+edName2.Text + ' dengan jumlah sample = '+edn2.Text+'('+edx21.Text+' '+edx22.Text; if edx23.Visible = true then memo1.Text := memo1.Text + ' '+edx23.Text; if edx24.Visible = true then memo1.Text := memo1.Text + ' '+edx24.Text; memo1.Text := memo1.Text + ')'+#13+#10+#13+#10;
showmodal; end; end; procedure TfrmMarket.Button3Click(Sender: TObject);
L.9 begin if validasi = false then exit; with frmSqueeze do begin sumber.Caption := 'Market'; edv1.Text := inttostr(strtoint(cbSum.Text)-1); edv2.Text := inttostr(strtoint(edn1.Text) + strtoint(edn2.Text) strtoint(cbSum.Text)); edn12.Text := inttostr(strtoint(edn1.Text) + strtoint(edn2.Text) - 2);
-
memo1.Clear; memo1.Text := 'Name of group 1 = '+edName1.Text + ' dengan jumlah sample = '+edn1.Text+'('+edx11.Text+' '+edx12.Text; if edx13.Visible = true then memo1.Text := memo1.Text + ' '+edx13.Text; if edx14.Visible = true then memo1.Text := memo1.Text + ' '+edx14.Text; memo1.Text := memo1.Text + ')'+#13+#10; memo1.Text := memo1.Text + 'Name of group 2 = '+edName2.Text + ' dengan jumlah sample = '+edn2.Text+'('+edx21.Text+' '+edx22.Text; if edx23.Visible = true then memo1.Text := memo1.Text + ' '+edx23.Text; if edx24.Visible = true then memo1.Text := memo1.Text + ' '+edx24.Text; memo1.Text := memo1.Text + ')'+#13+#10+#13+#10; showmodal; end; end; procedure TfrmMarket.Button4Click(Sender: TObject); begin if validasi = false then exit; with frmTest do begin sumber.Caption := 'Market'; edv1.Text := inttostr(strtoint(cbSum.Text)-1); edv2.Text := inttostr(strtoint(edn1.Text) + strtoint(cbSum.Text));
strtoint(edn2.Text)
-
memo1.Clear; memo1.Text := 'Name of group 1 = '+edName1.Text + ' dengan jumlah sample = '+edn1.Text+'('+edx11.Text+' '+edx12.Text; if edx13.Visible = true then memo1.Text := memo1.Text + ' '+edx13.Text; if edx14.Visible = true then memo1.Text := memo1.Text + ' '+edx14.Text; memo1.Text := memo1.Text + ')'+#13+#10; memo1.Text := memo1.Text + 'Name of group 2 = '+edName2.Text + ' dengan jumlah sample = '+edn2.Text+'('+edx21.Text+' '+edx22.Text; if edx23.Visible = true then memo1.Text := memo1.Text + ' '+edx23.Text; if edx24.Visible = true then memo1.Text := memo1.Text + ' '+edx24.Text; memo1.Text := memo1.Text + ')'+#13+#10+#13+#10;
L.10
showmodal; end; end; procedure TfrmMarket.cbSumChange(Sender: TObject); begin ed11.Visible := false; ed12.Visible := false; ed13.Visible := false; ed14.Visible := false; ed21.Visible := false; ed22.Visible := false; ed23.Visible := false; ed24.Visible := false; ed31.Visible := false; ed32.Visible := false; ed33.Visible := false; ed34.Visible := false; ed41.Visible := false; ed42.Visible := false; ed43.Visible := false; ed44.Visible := false; cbTreatment1.Visible := false; cbTreatment2.Visible := false; cbTreatment3.Visible := false; cbTreatment4.Visible := false; edx11.Visible := false; edx21.Visible := false; edx12.Visible := false; edx22.Visible := false; edx13.Visible := false; edx23.Visible := false; edx14.Visible := false; edx24.Visible := false; lbl1.Visible := false; lbl2.Visible := false; lbl3.Visible := false; lbl4.Visible := false; if strtoint(cbSUm.Text) >= 2 then begin ed11.Visible := true;
L.11 ed12.Visible := true; ed21.Visible := true; ed22.Visible := true; cbTreatment1.Visible := true; cbTreatment2.Visible := true; edx11.Visible := true; edx21.Visible := true; edx12.Visible := true; edx22.Visible := true; lbl1.Visible := true; lbl2.Visible := true; end; if strtoint(cbSUm.Text) >= 3 then begin ed13.Visible := true; ed23.Visible := true; ed33.Visible := true; ed31.Visible := true; ed32.Visible := true; cbTreatment3.Visible := true; edx13.Visible := true; edx23.Visible := true; lbl3.Visible := true; end; if strtoint(cbSum.Text) >= 4 then begin ed14.Visible := true; ed24.Visible := true; ed34.Visible := true; ed44.Visible := true; ed41.Visible := true; ed42.Visible := true; ed43.Visible := true; cbTreatment4.Visible := true; edx14.Visible := true; edx24.Visible := true; lbl4.Visible := true; end; end; procedure TfrmMarket.edx11KeyPress(Sender: TObject; var Key: Char); begin if ((key>='0') and (key<='9')) or (key=#8) or (key='.') or (key=’-‘) then else key:=#0; end;
L.12 procedure TfrmMarket.edn1KeyPress(Sender: TObject; var Key: Char); begin if ((key>='0') and (key<='9')) or (key=#8) then else key:=#0; end; procedure TfrmMarket.ed12Change(Sender: TObject); begin ed21.Text := ed12.Text; end; procedure TfrmMarket.ed13Change(Sender: TObject); begin ed31.Text := ed13.Text; end; procedure TfrmMarket.ed14Change(Sender: TObject); begin ed41.Text := ed14.Text; end; procedure TfrmMarket.ed23Change(Sender: TObject); begin ed32.Text := ed23.Text; end; procedure TfrmMarket.ed24Change(Sender: TObject); begin ed42.Text := ed24.Text; end; procedure TfrmMarket.ed34Change(Sender: TObject); begin ed43.Text := ed34.Text; end; end.
A.3
Form Menu Graph Delphi 7.0
unit uGraph; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
L.13 Dialogs, StdCtrls, ExtCtrls; type TfrmGraph = class(TForm) Label9: TLabel; Button1: TButton; Button2: TButton; Shape1: TShape; Button3: TButton; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label11: TLabel; Label12: TLabel; Label13: TLabel; Label14: TLabel; Label21: TLabel; Label22: TLabel; Label23: TLabel; Label24: TLabel; Shape2: TShape; Shape3: TShape; Shape4: TShape; Shape5: TShape; Shape11: TShape; Shape12: TShape; Shape13: TShape; Shape14: TShape; Shape21: TShape; Shape22: TShape; Shape23: TShape; Shape24: TShape; sumber: TLabel; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmGraph: TfrmGraph;
L.14 implementation uses uCompany, uMarket; {$R *.dfm} procedure TfrmGraph.FormClose(Sender: TObject; var Action: TCloseAction); begin self.Close; end; procedure TfrmGraph.Button1Click(Sender: TObject); begin self.Close; end; procedure TfrmGraph.Button2Click(Sender: TObject); begin application.Terminate; end; procedure TfrmGraph.Button3Click(Sender: TObject); var a,b:integer; begin if sumber.Caption = 'Company' then a:=strtoint(frmCompany.cbSum.Text) else a:=strtoint(frmMarket.cbSum.Text); with Canvas do begin //MoveTo(ClientWidth, ClientHeight); //LineTo(ClientWidth, ClientHeight); MoveTo(144, label11.Top); LineTo(288, label12.Top); MoveTo(144, label21.Top); LineTo(288, label22.Top); if a>=3 then begin MoveTo(288, label12.Top); LineTo(432, label13.Top); MoveTo(288, label22.Top); LineTo(432, label23.Top); end; if a=4 then begin
L.15 MoveTo(432, label13.Top); LineTo(576, label14.Top); MoveTo(432, label23.Top); LineTo(576, label24.Top); end; end; end; end.
A.4
Form Menu Pararellism Test Delphi 7.0
unit uParalel; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TfrmParalel = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; edAlpha: TEdit; edv1: TEdit; edv2: TEdit; edFTable: TEdit; edFCount: TEdit; Button1: TButton; Label9: TLabel; Button2: TButton; Button3: TButton; Button4: TButton; Button5: TButton; Memo1: TMemo; SaveDialog1: TSaveDialog; Label7: TLabel; Button6: TButton; sumber: TLabel;
L.16 procedure Button5Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormShow(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure edAlphaKeyPress(Sender: TObject; var Key: Char); procedure edFTableKeyPress(Sender: TObject; var Key: Char); procedure Button2Click(Sender: TObject); procedure Button6Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmParalel: TfrmParalel; const c:array[1..3,1..4] of real = ((1,-1,0,0),(0,1,-1,0),(0,0,1,-1)); implementation uses uCompany, uHelp, uTabelF05, uMarket; {$R *.dfm} procedure TfrmParalel.Button5Click(Sender: TObject); begin application.Terminate; end; procedure TfrmParalel.Button3Click(Sender: TObject); begin self.Close; end; procedure TfrmParalel.FormClose(Sender: TObject; var Action: TCloseAction); begin self.Close; end; procedure TfrmParalel.FormShow(Sender: TObject); var det,t2,p,f:real;
L.17 n1,n2,n,i,j,k:integer; a,b,x1,x2,x12:array[1..4] of real; s,cs,csc,ct,csc1,cx12:array[1..4,1..4] of real; begin edAlpha.Clear; edFTable.Clear; if sumber.Caption = 'Company' then begin with frmCompany do begin s[1][1] := strtofloat(ed11.Text); s[1][2] := strtofloat(ed12.Text); s[1][3] := strtofloat(ed13.Text); s[1][4] := strtofloat(ed14.Text); s[2][1] := strtofloat(ed21.Text); s[2][2] := strtofloat(ed22.Text); s[2][3] := strtofloat(ed23.Text); s[2][4] := strtofloat(ed24.Text); s[3][1] := strtofloat(ed31.Text); s[3][2] := strtofloat(ed32.Text); s[3][3] := strtofloat(ed33.Text); s[3][4] := strtofloat(ed34.Text); s[4][1] := strtofloat(ed41.Text); s[4][2] := strtofloat(ed42.Text); s[4][3] := strtofloat(ed43.Text); s[4][4] := strtofloat(ed44.Text); n := strtoint(cbSum.Text); n1 := strtoint(edn1.Text); n2 := strtoint(edn2.Text); p := n; x1[1] := strtofloat(edx11.Text); x1[2] := strtofloat(edx12.Text); x1[3] := strtofloat(edx13.Text); x1[4] := strtofloat(edx14.Text); x2[1] := strtofloat(edx21.Text); x2[2] := strtofloat(edx22.Text); x2[3] := strtofloat(edx23.Text); x2[4] := strtofloat(edx24.Text); end; end else begin with frmMarket do begin s[1][1] := strtofloat(ed11.Text); s[1][2] := strtofloat(ed12.Text);
L.18 s[1][3] := strtofloat(ed13.Text); s[1][4] := strtofloat(ed14.Text); s[2][1] := strtofloat(ed21.Text); s[2][2] := strtofloat(ed22.Text); s[2][3] := strtofloat(ed23.Text); s[2][4] := strtofloat(ed24.Text); s[3][1] := strtofloat(ed31.Text); s[3][2] := strtofloat(ed32.Text); s[3][3] := strtofloat(ed33.Text); s[3][4] := strtofloat(ed34.Text); s[4][1] := strtofloat(ed41.Text); s[4][2] := strtofloat(ed42.Text); s[4][3] := strtofloat(ed43.Text); s[4][4] := strtofloat(ed44.Text); n := strtoint(cbSum.Text); n1 := strtoint(edn1.Text); n2 := strtoint(edn2.Text); p := n; x1[1] := strtofloat(edx11.Text); x1[2] := strtofloat(edx12.Text); x1[3] := strtofloat(edx13.Text); x1[4] := strtofloat(edx14.Text); x2[1] := strtofloat(edx21.Text); x2[2] := strtofloat(edx22.Text); x2[3] := strtofloat(edx23.Text); x2[4] := strtofloat(edx24.Text); end; end; //CS for i:=1 to n-1 do for j:=1 to n do begin cs[i][j] := 0; for k:=1 to n do cs[i][j] := cs[i][j] + c[i][k] * s[k][j]; end; //Ct for i:=1 to n do for j:=1 to n-1 do ct[i][j] := c[j][i];
L.19 //CSC' for i:=1 to n-1 do for j:=1 to n-1 do begin csc[i][j] := 0; for k:=1 to n do csc[i][j] := csc[i][j] + cs[i][k] * ct[k][j]; end;
//Invers CSC' if n = 4 then begin det := csc[1][1]*csc[2][2]*csc[3][3] + csc[1][2]*csc[2][3]*csc[3][1] csc[1][3]*csc[2][1]*csc[3][2] (csc[1][3]*csc[2][2]*csc[3][1] + csc[1][2]*csc[2][1]*csc[3][3] csc[1][1]*csc[2][3]*csc[3][2]); csc1[1][1] := (csc[2][2]*csc[3][3] - csc[2][3]*csc[3][2]) / det; csc1[1][2] := (csc[1][3]*csc[3][2] - csc[1][2]*csc[3][3]) / det; csc1[1][3] := (csc[1][2]*csc[2][3] - csc[1][3]*csc[2][2]) / det; csc1[2][1] := (csc[2][3]*csc[3][1] - csc[2][1]*csc[3][3]) / det; csc1[2][2] := (csc[1][1]*csc[3][3] - csc[1][3]*csc[3][1]) / det; csc1[2][3] := (csc[1][3]*csc[2][1] - csc[1][1]*csc[2][3]) / det; csc1[3][1] := (csc[2][1]*csc[3][2] - csc[3][1]*csc[2][2]) / det; csc1[3][2] := (csc[1][2]*csc[3][1] - csc[1][1]*csc[3][2]) / det; csc1[3][3] := (csc[1][1]*csc[2][2] - csc[2][1]*csc[1][2]) / det; end else if n = 3 then begin det := (csc[1][1]*csc[2][2] - csc[1][2]*csc[2][1]); csc1[1][1] := csc[2][2] / det; csc1[1][2] := -csc[1][2] / det; csc1[2][1] := -csc[2][1] / det; csc1[2][2] := csc[1][1] / det; end else if n = 2 then csc1[1][1] := csc[1][1]; //x1 - x2 for i:=1 to n do x12[i] := x1[i] - x2[i]; //C(x1-x2) for i:=1 to n-1 do begin cx12[i][1] := 0;
+ +
L.20 for k:=1 to n do cx12[i][1] := cx12[i][1] + c[i][k] * x12[k]; end;
for i:=1 to n do a[i] := cx12[i][1] * (n1*n2/(n1+n2)); for i:=1 to n-1 do begin b[i] := 0; for k:=1 to n-1 do b[i] := b[i] + csc1[i][k] * cx12[k][1]; end; t2 := 0; for i:=1 to n-1 do t2 := t2 + a[i] * b[i]; f:= (n1+n2-p) / ((n1+n2-2)*(p-1)) * t2; f:= round(f*100) / 100;
edFCount.Text := floattostr(f);
//Cetak Matrikx { memo1.Clear; for i:=1 to n-1 do begin for j:=1 to n-1 do memo1.Text := memo1.Text + floattostr(csc1[i][j])+' '; memo1.Text := memo1.Text + #13 + #10; end; } end; procedure TfrmParalel.Button4Click(Sender: TObject); var f:textfile; begin if savedialog1.Execute then begin assignfile(f, savedialog1.FileName);rewrite(f); writeln(f, memo1.text); closefile(f); end; end;
L.21
procedure TfrmParalel.Button1Click(Sender: TObject); begin if edAlpha.Text = '' then exit; if edFtable.Text = '' then exit; //UNTUK MENENTUKAN HASIL ANALYZE PARALELLISM TEST if strtofloat(edfcount.Text) < strtofloat(edftable.Text) then begin memo1.Text := memo1.Text + 'Sesuai dengan kaidah keputusan, maka kita menerima H01'+#13+#10; memo1.Text := memo1.Text + 'karena F = '+edfcount.Text+' < F table = '+edFtable.Text+'; dengan demikian disimpulkan'+#13+#10; memo1.Text := memo1.Text + 'pada dasarnya profil populasi kelompok 1 sejajar dengan profil populasi kelompok 2'+#13+#10; memo1.Text := memo1.Text + 'Rekomendasi pengembangan yang dapat dilakukan oleh kedua area pasar, sebagai berikut:'+#13+#10; memo1.Text := memo1.Text + '- Berikan perlakuan yang sama untuk area yang memiliki rata - rata perlakuan lebih rendah'+#13+#10; memo1.Text := memo1.Text + '- Pengembangan area pasar yang memilki rata - rata perlakuan rendah dapat mengacu pada area pasar yang diujikan bersamanya'+#13+#10; memo1.Text := memo1.Text + '- Cobakan berikan dengan perlakuan yang berbeda untuk kedua area'+#13+#10; memo1.Text := memo1.Text + '- Lakukan pengembangan area tidak tertuju pada satu atau dua area saja'+#13+#10;
end else begin memo1.Text := memo1.Text + 'Sesuai dengan kaidah keputusan, maka kita menolak H01'+#13+#10; memo1.Text := memo1.Text + 'karena F = '+edfcount.Text+' > F table = '+edFtable.Text+'; dengan demikian disimpulkan'+#13+#10; memo1.Text := memo1.Text + 'pada dasarnya profil populasi kelompok 1 tidak sejajar dengan profil populasi kelompok 2'+#13+#10; memo1.Text := memo1.Text + 'Rekomendasi pengembangan yang dapat dilakukan oleh kedua area pasar, sebagai berikut:'+#13+#10; memo1.Text := memo1.Text + '- Berikan perlakuan yang beda untuk area yang memiliki rata - rata perlakuan lebih rendah'+#13+#10; memo1.Text := memo1.Text + '- Atau berikan perlakuan yang sama tetapi dengan kapasitas yang lebih kepada area dengan nilai rata - rata perlakuan yang lebih rendah'+#13+#10; memo1.Text := memo1.Text + '- Cobakan berikan dengan perlakuan yang berbeda untuk kedua area'+#13+#10; memo1.Text := memo1.Text + '- Lakukan pengembangan area tidak tertuju pada satu satu atau dua area saja'+#13+#10;
L.22 end; end; procedure TfrmParalel.edAlphaKeyPress(Sender: TObject; var Key: Char); begin if ((key>='0') and (key<='9')) or (key=#8) or (key='.') then else key:=#0; end; procedure TfrmParalel.edFTableKeyPress(Sender: TObject; var Key: Char); begin if ((key>='0') and (key<='9')) or (key=#8) or (key='.') then else key:=#0; end; procedure TfrmParalel.Button2Click(Sender: TObject); begin frmhelp.showmodal; end; procedure TfrmParalel.Button6Click(Sender: TObject); begin frmTabelF05.show; end; end.
A.5
Form Menu Squeeze Test Delphi 7.0
unit uSqueeze; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TfrmSqueeze = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label9: TLabel; edAlpha: TEdit;
L.23 edv1: TEdit; edv2: TEdit; edFTable: TEdit; edTSquare: TEdit; Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; Button5: TButton; Memo1: TMemo; Label7: TLabel; Label8: TLabel; Label10: TLabel; Label11: TLabel; edalpha2: TEdit; edn12: TEdit; edttable: TEdit; SaveDialog1: TSaveDialog; Label12: TLabel; Button6: TButton; Button7: TButton; sumber: TLabel; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Button3Click(Sender: TObject); procedure Button5Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure edAlphaKeyPress(Sender: TObject; var Key: Char); procedure edFTableKeyPress(Sender: TObject; var Key: Char); procedure edalpha2KeyPress(Sender: TObject; var Key: Char); procedure edttableKeyPress(Sender: TObject; var Key: Char); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button6Click(Sender: TObject); procedure Button7Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmSqueeze: TfrmSqueeze; implementation uses uCompany, uHelp, uTabelT, uTabelF05, uMarket;
L.24
{$R *.dfm} procedure TfrmSqueeze.FormClose(Sender: TObject; var Action: TCloseAction); begin self.close; end; procedure TfrmSqueeze.Button3Click(Sender: TObject); begin self.Close; end; procedure TfrmSqueeze.Button5Click(Sender: TObject); begin application.Terminate; end; procedure TfrmSqueeze.Button4Click(Sender: TObject); var f:textfile; begin if savedialog1.Execute then begin assignfile(f, savedialog1.FileName);rewrite(f); writeln(f, memo1.text); closefile(f); end; end; procedure TfrmSqueeze.FormShow(Sender: TObject); var a,b,t2:real; n1,n2,n,i,j:integer; x1,x2:array[1..4] of real; s:array[1..4,1..4] of real; begin edAlpha.Clear; edFTable.Clear; edalpha2.Clear; edttable.Clear; if sumber.Caption = 'Company' then begin with frmCompany do begin s[1][1] := strtofloat(ed11.Text); s[1][2] := strtofloat(ed12.Text); s[1][3] := strtofloat(ed13.Text); s[1][4] := strtofloat(ed14.Text);
L.25 s[2][1] := strtofloat(ed21.Text); s[2][2] := strtofloat(ed22.Text); s[2][3] := strtofloat(ed23.Text); s[2][4] := strtofloat(ed24.Text); s[3][1] := strtofloat(ed31.Text); s[3][2] := strtofloat(ed32.Text); s[3][3] := strtofloat(ed33.Text); s[3][4] := strtofloat(ed34.Text); s[4][1] := strtofloat(ed41.Text); s[4][2] := strtofloat(ed42.Text); s[4][3] := strtofloat(ed43.Text); s[4][4] := strtofloat(ed44.Text); n := strtoint(cbSum.Text); n1 := strtoint(edn1.Text); n2 := strtoint(edn2.Text); x1[1] := strtofloat(edx11.Text); x1[2] := strtofloat(edx12.Text); x1[3] := strtofloat(edx13.Text); x1[4] := strtofloat(edx14.Text); x2[1] := strtofloat(edx21.Text); x2[2] := strtofloat(edx22.Text); x2[3] := strtofloat(edx23.Text); x2[4] := strtofloat(edx24.Text); end; end else begin with frmMarket do begin s[1][1] := strtofloat(ed11.Text); s[1][2] := strtofloat(ed12.Text); s[1][3] := strtofloat(ed13.Text); s[1][4] := strtofloat(ed14.Text); s[2][1] := strtofloat(ed21.Text); s[2][2] := strtofloat(ed22.Text); s[2][3] := strtofloat(ed23.Text); s[2][4] := strtofloat(ed24.Text); s[3][1] := strtofloat(ed31.Text); s[3][2] := strtofloat(ed32.Text); s[3][3] := strtofloat(ed33.Text); s[3][4] := strtofloat(ed34.Text); s[4][1] := strtofloat(ed41.Text); s[4][2] := strtofloat(ed42.Text); s[4][3] := strtofloat(ed43.Text); s[4][4] := strtofloat(ed44.Text);
L.26 n := strtoint(cbSum.Text); n1 := strtoint(edn1.Text); n2 := strtoint(edn2.Text); x1[1] := strtofloat(edx11.Text); x1[2] := strtofloat(edx12.Text); x1[3] := strtofloat(edx13.Text); x1[4] := strtofloat(edx14.Text); x2[1] := strtofloat(edx21.Text); x2[2] := strtofloat(edx22.Text); x2[3] := strtofloat(edx23.Text); x2[4] := strtofloat(edx24.Text); end; end; a:=0; for i:=1 to n do a := a + (x1[i]-x2[i]); b:=0; for i:=1 to n do for j:=1 to n do b:=b+s[i][j]; t2 := a*a* (1/ ((1/n1 + 1/n2)*b)) ; t2:= round(t2*100) / 100; edTSquare.Text := floattostr(t2); end; procedure TfrmSqueeze.edAlphaKeyPress(Sender: TObject; var Key: Char); begin if ((key>='0') and (key<='9')) or (key=#8) or (key='.') then else key:=#0; end; procedure TfrmSqueeze.edFTableKeyPress(Sender: TObject; var Key: Char); begin if ((key>='0') and (key<='9')) or (key=#8) or (key='.') then else key:=#0; end; procedure TfrmSqueeze.edalpha2KeyPress(Sender: TObject; var Key: Char); begin if ((key>='0') and (key<='9')) or (key=#8) or (key='.') then else key:=#0; end;
L.27 procedure TfrmSqueeze.edttableKeyPress(Sender: TObject; var Key: Char); begin if ((key>='0') and (key<='9')) or (key=#8) or (key='.') then else key:=#0; end; procedure TfrmSqueeze.Button1Click(Sender: TObject); begin if edAlpha.Text = '' then exit; if edFTable.Text = '' then exit; if edTTable.Text = '' then exit; if edAlpha2.Text = '' then exit; //UNTUK MENENTUKAN HASIL ANALYZE SQUEEZE TEST tahap 1 if strtofloat(edTSquare.Text) > strtofloat(edFTable.Text) then begin memo1.Text := memo1.Text + 'Sesuai dengan kaidah keputusan, maka kita menolak H02 karena'+#13+#10; memo1.Text := memo1.Text + 'T-square = '+edTSquare.Text+' > F-table = '+edFTable.Text+' (berdasarkan transformasi linear)'+#13+#10; memo1.Text := memo1.Text + 'Dengan demikian dapat disimpulkan bahwa taraf (level) dari profil-profil adalah berbeda sangat nyata pada alpha='+edAlpha.Text+' '; memo1.Text := memo1.Text + 'jadi kedua profil tersebut tidak berimpit'+#13+#10; memo1.Text := memo1.Text + 'Rekomendasi pengembangan yang dapat dilakukan oleh kedua area pasar, sebagai berikut:'+#13+#10; memo1.Text := memo1.Text + '- Hasil analisa menunjukkan bahwa total nilai ratarata respons perlakuan ke dua area berbeda'+#13+#10; memo1.Text := memo1.Text + '- Coba berikan perlakuan yang sama kepada area yang memilki rata - rata repons perlakuan lebih rendah'+#13+#10; memo1.Text := memo1.Text + '- Lakukan pengembangan area tidak tertuju pada satu atau dua area saja'+#13+#10; end else begin memo1.Text := memo1.Text + 'Sesuai dengan kaidah keputusan, maka kita menerima H02 karena'+#13+#10; memo1.Text := memo1.Text + 'T-square = '+edTSquare.Text+' < F-table = '+edFTable.Text+' (berdasarkan transformasi linear)'+#13+#10; memo1.Text := memo1.Text + 'Dengan demikian dapat disimpulkan bahwa taraf (level) dari profil-profil adalah berbeda sangat nyata pada alpha='+edAlpha.Text+' '; memo1.Text := memo1.Text + 'jadi kedua profil tersebut berimpit'; memo1.Text := memo1.Text + 'Rekomendasi pengembangan yang dapat dilakukan oleh kedua area pasar, sebagai berikut:'+#13+#10; memo1.Text := memo1.Text + '- Hasil analisa menunjukkan bahwa total nilai ratarata respons perlakuan ke dua area sama'+#13+#10; memo1.Text := memo1.Text + '- Coba berikan perlakuan yang belum sama sekali pernah diberikan kepada area yang memilki rata - rata repons perlakuan lebih rendah'+#13+#10;
L.28 memo1.Text := memo1.Text + '- Lakukan pengembangan area tidak tertuju pada satu atau dua area saja'; end; memo1.Text := memo1.Text + #13+#10+#13+#10; //Tahap 2 if strtofloat(edTTable.Text)<>0 then begin memo1.Text := memo1.Text + 'Oleh karena selang kepercayaan '+floattostr((1strtofloat(edAlpha2.Text))*100)+' % bagi parameter j'+#39+'(U1-U2) '; memo1.Text := memo1.Text + 'tidak mengandung nilai nol, maka hal ini menunjukkan bahwa kedua profil yang diuji tidak berimpit'; end else begin memo1.Text := memo1.Text + 'Oleh karena selang kepercayaan '+floattostr((1strtofloat(edAlpha2.Text))*100)+' % bagi parameter j'+#39+'(U1-U2) '; memo1.Text := memo1.Text + 'mengandung nilai nol, maka hal ini menunjukkan bahwa kedua profil yang diuji berimpit'; end; end; procedure TfrmSqueeze.Button2Click(Sender: TObject); begin frmhelp.showmodal; end; procedure TfrmSqueeze.Button6Click(Sender: TObject); begin frmTabelT.show; end; procedure TfrmSqueeze.Button7Click(Sender: TObject); begin frmTabelF05.show; end; end.
A.6
Form Menu Test With X Axis Delphi 7.0
unit uTest; interface
L.29
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TfrmTest = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label9: TLabel; edAlpha: TEdit; edv1: TEdit; edv2: TEdit; edFTable: TEdit; edFCount: TEdit; Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; Button5: TButton; Memo1: TMemo; SaveDialog1: TSaveDialog; Label7: TLabel; Button6: TButton; sumber: TLabel; procedure Button3Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Button4Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure Button5Click(Sender: TObject); procedure edAlphaKeyPress(Sender: TObject; var Key: Char); procedure edFTableKeyPress(Sender: TObject; var Key: Char); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button6Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmTest: TfrmTest;
L.30
const c:array[1..3,1..4] of real = ((1,-1,0,0),(0,1,-1,0),(0,0,1,-1)); implementation uses uCompany, uHelp, uTabelF05, uMarket; {$R *.dfm} procedure TfrmTest.Button3Click(Sender: TObject); begin self.Close; end; procedure TfrmTest.FormClose(Sender: TObject; var Action: TCloseAction); begin self.Close; end; procedure TfrmTest.Button4Click(Sender: TObject); var f:textfile; begin if savedialog1.Execute then begin assignfile(f, savedialog1.FileName);rewrite(f); writeln(f, memo1.text); closefile(f); end; end; procedure TfrmTest.FormShow(Sender: TObject); var p,det,t2,f:real; n1,n2,n,i,j,k:integer; x,x1,x2,xc,a:array[1..4] of real; cs,csc,csc1,s,ct:array[1..4,1..4] of real; begin edAlpha.Clear; edFTable.Clear; if sumber.Caption = 'Company' then begin with frmCompany do begin s[1][1] := strtofloat(ed11.Text); s[1][2] := strtofloat(ed12.Text); s[1][3] := strtofloat(ed13.Text); s[1][4] := strtofloat(ed14.Text); s[2][1] := strtofloat(ed21.Text);
L.31 s[2][2] := strtofloat(ed22.Text); s[2][3] := strtofloat(ed23.Text); s[2][4] := strtofloat(ed24.Text); s[3][1] := strtofloat(ed31.Text); s[3][2] := strtofloat(ed32.Text); s[3][3] := strtofloat(ed33.Text); s[3][4] := strtofloat(ed34.Text); s[4][1] := strtofloat(ed41.Text); s[4][2] := strtofloat(ed42.Text); s[4][3] := strtofloat(ed43.Text); s[4][4] := strtofloat(ed44.Text); n := strtoint(cbSum.Text); n1 := strtoint(edn1.Text); n2 := strtoint(edn2.Text); p := n; x1[1] := strtofloat(edx11.Text); x1[2] := strtofloat(edx12.Text); x1[3] := strtofloat(edx13.Text); x1[4] := strtofloat(edx14.Text); x2[1] := strtofloat(edx21.Text); x2[2] := strtofloat(edx22.Text); x2[3] := strtofloat(edx23.Text); x2[4] := strtofloat(edx24.Text); end; end else begin with frmMarket do begin s[1][1] := strtofloat(ed11.Text); s[1][2] := strtofloat(ed12.Text); s[1][3] := strtofloat(ed13.Text); s[1][4] := strtofloat(ed14.Text); s[2][1] := strtofloat(ed21.Text); s[2][2] := strtofloat(ed22.Text); s[2][3] := strtofloat(ed23.Text); s[2][4] := strtofloat(ed24.Text); s[3][1] := strtofloat(ed31.Text); s[3][2] := strtofloat(ed32.Text); s[3][3] := strtofloat(ed33.Text); s[3][4] := strtofloat(ed34.Text); s[4][1] := strtofloat(ed41.Text); s[4][2] := strtofloat(ed42.Text); s[4][3] := strtofloat(ed43.Text); s[4][4] := strtofloat(ed44.Text);
L.32
n := strtoint(cbSum.Text); n1 := strtoint(edn1.Text); n2 := strtoint(edn2.Text); p := n; x1[1] := strtofloat(edx11.Text); x1[2] := strtofloat(edx12.Text); x1[3] := strtofloat(edx13.Text); x1[4] := strtofloat(edx14.Text); x2[1] := strtofloat(edx21.Text); x2[2] := strtofloat(edx22.Text); x2[3] := strtofloat(edx23.Text); x2[4] := strtofloat(edx24.Text); end; end; //Ct for i:=1 to n do for j:=1 to n-1 do ct[i][j] := c[j][i]; //xfor i:=1 to n do x[i] := (n1/(n1+n2)) * x1[i] + (n2/(n1+n2)) * x2[i]; //X'C' for j:=1 to n-1 do begin xc[j]:=0; for k:=1 to n do xc[j] := xc[j] + x[k] * ct[k][j]; end;
//CS for i:=1 to n-1 do for j:=1 to n do begin cs[i][j] := 0; for k:=1 to n do cs[i][j] := cs[i][j] + c[i][k] * s[k][j]; end;
//CSC' for i:=1 to n-1 do
L.33 for j:=1 to n-1 do begin csc[i][j] := 0; for k:=1 to n do csc[i][j] := csc[i][j] + cs[i][k] * ct[k][j]; end; //Invers CSC' if n = 4 then begin det := csc[1][1]*csc[2][2]*csc[3][3] + csc[1][2]*csc[2][3]*csc[3][1] csc[1][3]*csc[2][1]*csc[3][2] (csc[1][3]*csc[2][2]*csc[3][1] + csc[1][2]*csc[2][1]*csc[3][3] csc[1][1]*csc[2][3]*csc[3][2]); csc1[1][1] := (csc[2][2]*csc[3][3] - csc[2][3]*csc[3][2]) / det; csc1[1][2] := (csc[1][3]*csc[3][2] - csc[1][2]*csc[3][3]) / det; csc1[1][3] := (csc[1][2]*csc[2][3] - csc[1][3]*csc[2][2]) / det; csc1[2][1] := (csc[2][3]*csc[3][1] - csc[2][1]*csc[3][3]) / det; csc1[2][2] := (csc[1][1]*csc[3][3] - csc[1][3]*csc[3][1]) / det; csc1[2][3] := (csc[1][3]*csc[2][1] - csc[1][1]*csc[2][3]) / det; csc1[3][1] := (csc[2][1]*csc[3][2] - csc[3][1]*csc[2][2]) / det; csc1[3][2] := (csc[1][2]*csc[3][1] - csc[1][1]*csc[3][2]) / det; csc1[3][3] := (csc[1][1]*csc[2][2] - csc[2][1]*csc[1][2]) / det; end else if n = 3 then begin det := (csc[1][1]*csc[2][2] - csc[1][2]*csc[2][1]); csc1[1][1] := csc[2][2] / det; csc1[1][2] := -csc[1][2] / det; csc1[2][1] := -csc[2][1] / det; csc1[2][2] := csc[1][1] / det; end else if n = 2 then csc1[1][1] := csc[1][1];
for i:=1 to n-1 do begin a[i] := 0; for j:=1 to n-1 do a[i] := a[i] + (n1+n2)*xc[j]*csc1[j][i]; end; t2 := 0; for i:=1 to n-1 do t2 := t2 + a[i] * xc[i]; f:= t2*(n1+n2-p)/((n1+n2-2)*(p-1));
+ +
L.34
f:= round(f*100) / 100; edFCount.Text := floattostr(f); //Cetak Matrikx { memo1.Clear; for i:=1 to n-1 do begin //for j:=1 to n-1 do memo1.Text := memo1.Text + floattostr(xc[i])+' '; memo1.Text := memo1.Text + #13 + #10; end; } end; procedure TfrmTest.Button5Click(Sender: TObject); begin application.Terminate; end; procedure TfrmTest.edAlphaKeyPress(Sender: TObject; var Key: Char); begin if ((key>='0') and (key<='9')) or (key=#8) or (key='.') then else key:=#0; end; procedure TfrmTest.edFTableKeyPress(Sender: TObject; var Key: Char); begin if ((key>='0') and (key<='9')) or (key=#8) or (key='.') then else key:=#0; end; procedure TfrmTest.Button1Click(Sender: TObject); begin if edAlpha.Text = '' then exit; if edFTable.Text = '' then exit; //HASIL ANALYZE TEST WITH X-AXIS if strtofloat(edFCount.Text) > strtofloat(edFTable.Text) then begin memo1.Text := memo1.Text + 'Sesuai dengan kaidah keputusan, kita menolak H03 karena '; memo1.Text := memo1.Text + 'F = '+edFCount.Text+' > F-table = '+edFTable.Text+' (berdasarkan interpolasi linear)'+#13+#10; memo1.Text := memo1.Text + 'Dengan demikian disimpulkan bahwa profil-profil itu tidak sejajar terhadap sumbu datar (sumbu X)';
L.35 memo1.Text := memo1.Text + 'dan oleh karena itu disimpulkan bahwa pengaruh perlakuan tidak sama semuanya.......'+#13+#10; memo1.Text := memo1.Text + 'Rekomendasi pengembangan yang dapat dilakukan oleh kedua area pasar, sebagai berikut:'+#13+#10; memo1.Text := memo1.Text + '- Hasil analisa menunjukkan bahwa pengaruh perlakuan yang diberikan tidak sama terhadap kedua area'+#13+#10; memo1.Text := memo1.Text + '- Coba berikan perlakuan yang beda kepada area yang memilki rata - rata repons perlakuan lebih rendah'+#13+#10; memo1.Text := memo1.Text + '- Lakukan pengembangan area tidak tertuju pada satu atau dua area saja'+#13+#10; end else begin memo1.Text := memo1.Text + 'Sesuai dengan kaidah keputusan, kita menerima H03 karena '; memo1.Text := memo1.Text + 'F = '+edFCount.Text+' < F-table = '+edFTable.Text+' (berdasarkan interpolasi linear)'+#13+#10; memo1.Text := memo1.Text + 'Dengan demikian disimpulkan bahwa profil-profil itu sejajar terhadap sumbu datar (sumbu X) '; memo1.Text := memo1.Text + 'dan oleh karena itu disimpulkan bahwa pengaruh perlakuan sama semuanya.......'+#13+#10; memo1.Text := memo1.Text + 'Rekomendasi pengembangan yang dapat dilakukan oleh kedua area pasar, sebagai berikut:'+#13+#10; memo1.Text := memo1.Text + '- Hasil analisa menunjukkan bahwa pengaruh perlakuan yang diberikan sama terhadap kedua area'+#13+#10; memo1.Text := memo1.Text + '- Coba berikan perlakuan yang sama atau berikan perlakuan yang belum pernah diberikan kepada area yang memilki rata - rata repons perlakuan lebih rendah'+#13+#10; memo1.Text := memo1.Text + '- Lakukan pengembangan area tidak tertuju pada satu atau dua area saja'+#13+#10;
end; end; procedure TfrmTest.Button2Click(Sender: TObject); begin frmhelp.showmodal; end; procedure TfrmTest.Button6Click(Sender: TObject); begin frmTabelF05.show; end; end.
L.36 A.7
Form Menu Table F Delphi 7.0
unit uTabelF05; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, uDM, StdCtrls, Grids, DBGrids; type TfrmTabelF05 = class(TForm) DataSource1: TDataSource; DBGrid1: TDBGrid; Label2: TLabel; Label1: TLabel; Button1: TButton; Label3: TLabel; Label4: TLabel; DBGrid2: TDBGrid; DataSource2: TDataSource; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmTabelF05: TfrmTabelF05; implementation {$R *.dfm} procedure TfrmTabelF05.FormClose(Sender: TObject; var Action: TCloseAction); begin self.Hide; end; procedure TfrmTabelF05.Button1Click(Sender: TObject); begin self.Hide; end;
L.37 end.
A.8
Form Menu Table T Delphi 7.0
unit uTabelT; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uDM, DB, Grids, DBGrids, StdCtrls; type TfrmTabelT = class(TForm) DBGrid1: TDBGrid; DataSource1: TDataSource; Label2: TLabel; Button1: TButton; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmTabelT: TfrmTabelT; implementation {$R *.dfm} procedure TfrmTabelT.FormClose(Sender: TObject; var Action: TCloseAction); begin self.Hide; end; procedure TfrmTabelT.Button1Click(Sender: TObject); begin self.Hide; end; end.
L.38 A.9
Form Menu Help Delphi 7.0
unit uHelp; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TfrmHelp = class(TForm) Memo1: TMemo; procedure FormClose(Sender: TObject; var Action: TCloseAction); private { Private declarations } public { Public declarations } end; var frmHelp: TfrmHelp; implementation {$R *.dfm} procedure TfrmHelp.FormClose(Sender: TObject; var Action: TCloseAction); begin self.Close; end; end.
A.10
Form Menu Info Delphi 7.0
unit uInfo; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, jpeg; type
L.39 TfrmInfo = class(TForm) Label9: TLabel; Image1: TImage; Label2: TLabel; Button1: TButton; Label1: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel; Label8: TLabel; Label10: TLabel; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmInfo: TfrmInfo; implementation uses uMenu; {$R *.dfm} procedure TfrmInfo.FormClose(Sender: TObject; var Action: TCloseAction); begin self.Hide; frmMenu.show; end; procedure TfrmInfo.Button1Click(Sender: TObject); begin self.Hide; frmMenu.show; end; end.
L.40
LAMPIRAN B: LANGKAH – LANGKAH PEMAKAIAN PROGRAM
Berikut ini adalah langkah – langkah yang harus dilakukan untuk menggunakan program aplikasi Traditional Market Profile Analysis :
Pada Menu Main Menu : 1. Klik Info untuk melihat Info pembuat program aplikasi ini dan alamat kontaknya. 2. Klik Traditional Market Analysis untuk memulai analisis profil dua kelompok pasar tradisional. 3. Klik Exit untuk keluar dari program.
Pada Menu Traditional Market Analysis : 1. Tentukan jumlah perlakuan yang ingin diberikan dengan memilih pada Sum of Treatment. 2. Isi Covariance Matrix. 3. Pilih nama Treatment. 4. Pada group 1, isi nama kelompok (pasar) 1 yang diujikan pada Name of Group. 5. Pada group 1, Isi jumlah sampel kelompok 1 pada Sum of Sample. 6. Ulangi langkah 4&5 untuk Group 2 7. Klik Graph untuk menganalisis data group 1 dan group 2 dengan grafik garis. 8. Klik Pararellism Test untuk menganalisis data group 1 dan group 2 dengan uji kesejajaran profil.
L.41 9. Klik Squeeze Test untuk menganalisa data group 1 dan group 2 dengan uji keberimpitan profil. 10. Klik Test with X Axis untuk menganalisa data group 1 dan group 2 dengan uji kesejajaran dengan sumbu X. 11. Klik Exit untuk keluar dari program. 12. Klik Help untuk melihat petunjuk pemakaian program.
Pada Menu Graph : 1. Klik Generate Graph untuk memunculkan grafik. 2. Klik Back untuk kembali ke menu Traditional Market Analysis. 3. Klik Exit untuk keluar dari program
Pada Menu Pararellism Test : 1. Isi nilai alpha yang diminta. 2. Isi nilai F tabel yang diminta, untuk bantuan klik Table untuk melihat nilai F table. 3. Klik Analyze untuk melihat hasil analisis uji kesejajaran. 4. Klik Exit untuk keluar dari program. 5. Klik Help untuk melihat petunjuk pemakaian program. 6. Klik Back untuk kembali ke menu Traditional Market Analysis. 7. Klik Save Result untuk menyimpan hasil analisa pada memo result ke dalam format .txt.
L.42 Pada Menu Squeeze Test : 1. Isi nilai alpha yang diminta. 2. Isi nilai F tabel yang diminta, untuk bantuan,klik Table untuk melihat nilai F tabel. 3. Isi nilai T tabel yang diminta, untuk bantuan,klik Table untuk melihat nilai T tabel. 4. Klik Analyze untuk melihat hasil analisis uji keberimpitan. 5. Klik Exit untuk keluar dari program. 6. Klik Help untuk melihat petunjuk pemakaian program. 7. Klik Back untuk kembali ke menu Traditional Market Analysis. 8. Klik Save Result untuk menyimpan hasil analisa pada memo result ke dalam format .txt.
Pada Menu Test With X Axis : 1. Isi nilai alpha yang diminta. 2. Isi nilai F tabel yang diminta, untuk bantuan klik Table untuk melihat nilai F table. 3. Klik Analyze untuk melihat hasil analisis uji kesejajaran dengan sumbu X. 4. Klik Exit untuk keluar dari program. 5. Klik Help untuk melihat petunjuk pemakaian program. 6. Klik Back untuk kembali ke menu Traditional Market Analysis. 7. Klik Save Result untuk menyimpan hasil analisa pada memo result ke dalam format .txt