software development strategy with high quality design for...
TRANSCRIPT
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 99
Chapter 10
ANALYSIS IMPLEMENTATION
Form1:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
int flagbutt = 1;
int [] modcounter = new int[5];
String [] modname = new String[5];
int[] modflag = new int[5];
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
for (int i = 0; i < 5; i++)
{
modcounter[i] = 0;
}
modname[0] = "Waterfall Model";
modname[1] = "R.A.D. Model";
modname[2] = "Incremental Model";
modname[3] = "Spiral Model";
modname[4] = "Prototype Model";
}
private void quit_Click(object sender, EventArgs e)
{
this.Close();
}
private void next_Click(object sender, EventArgs e)
{
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 100
if (flagbutt == 1)
{
reset.Enabled = true;
if (radioButton1.Checked)
{
modcounter[3]++;
modcounter[4]++;
}
else if (radioButton2.Checked)
{
modcounter[0]++;
modcounter[1]++;
modcounter[2]++;
}
label1.Text = "Q. Do you have a legacy system?";
radioButton1.Text = "Yes";
radioButton2.Text = "No";
}
else if (flagbutt == 2)
{
if (radioButton1.Checked)
{
modcounter[0]++;
modcounter[1]++;
modcounter[2]++;
modcounter[3]++;
}
else if (radioButton2.Checked)
{
modcounter[4]++;
}
label1.Text = "Q. What is the cost?";
radioButton1.Text = "Expensive";
radioButton2.Text = "Not accurate";
}
else if (flagbutt == 3)
{
if (radioButton1.Checked)
{
modcounter[3]++;
modcounter[4]++;
}
else if (radioButton2.Checked)
{
modcounter[0]++;
modcounter[1]++;
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 101
modcounter[2]++;
}
label1.Text = "Q. What is the time of completion required?";
radioButton1.Text = "Fast";
radioButton2.Text = "Slow";
}
else if (flagbutt == 4)
{
if (radioButton1.Checked)
{
modcounter[1]++;
modcounter[2]++;
modcounter[4]++;
}
else if (radioButton2.Checked)
{
modcounter[0]++;
modcounter[3]++;
}
label1.Text = "Q. Type of quality standards required?";
radioButton1.Text = "High";
radioButton2.Text = "Low";
}
else if (flagbutt == 5)
{
if (radioButton1.Checked)
{
modcounter[0]++;
modcounter[2]++;
modcounter[3]++;
}
else if (radioButton2.Checked)
{
modcounter[1]++;
modcounter[4]++;
}
label1.Text = "Q. Do you want change control?";
radioButton1.Text = "Yes";
radioButton2.Text = "No";
next.Visible = false;
submit.Visible = true;
}
else if (flagbutt == 6)
{
if (radioButton1.Checked)
{
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 102
modcounter[2]++;
modcounter[3]++;
modcounter[4]++;
}
else if (radioButton2.Checked)
{
modcounter[0]++;
modcounter[1]++;
}
}
flagbutt++;
}
private void submit_Click(object sender, EventArgs e)
{
panel1.Visible = false;
for (int a = 0; a < 5; a++)
{
for (int b = 0; b < 4; b++)
{
if (modcounter[b] > modcounter[b + 1])
{
String temp2 = modname[b];
modname[b] = modname[b + 1];
modname[b + 1] = temp2;
int temp1 = modcounter[b];
modcounter[b] = modcounter[b + 1];
modcounter[b + 1] = temp1;
}
}
}
label1.Text = "Most appropriate process models:\n\n1." + modname[4] + "\n\n2. " +
modname[3] + "\n\n3. " + modname[2];
submit.Visible = false;
cont.Visible = true;
}
private void reset_Click(object sender, EventArgs e)
{
this.Hide();
Form1 frm1 = new Form1();
frm1.Show();
}
private void cont_Click(object sender, EventArgs e)
{
this.Hide();
if (modname[2]=="Waterfall Model"||modname[3]=="Waterfall
Model"||modname[4]=="Waterfall Model")
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 103
{
modflag[0] = 1;
}
if (modname[2]=="R.A.D. Model"||modname[3]=="R.A.D.
Model"||modname[4]=="R.A.D. Model")
{
modflag[1] = 1;
}
if (modname[2]=="Incremental Model"||modname[3]=="Incremental
Model"||modname[4]=="Incremental Model")
{
modflag[2] = 1;
}
if (modname[2]=="Spiral Model"||modname[3]=="Spiral Model"||modname[4]=="Spiral
Model")
{
modflag[3] = 1;
}
if (modname[2] == "Prototype Model" || modname[3] == "Prototype Model" ||
modname[4] == "Prototype Model")
{
modflag[4] = 1;
}
if ((modflag[2] == 1) && (modflag[3] == 1) && (modflag[4] == 1))
{
isp frm2 = new isp();
frm2.Show();
}
else if ((modflag[0] == 1) && (modflag[1] == 1) && (modflag[2] == 1))
{
wri frm3 = new wri();
frm3.Show();
}
else if ((modflag[0] == 1) && (modflag[2] == 1) && (modflag[3] == 1))
{
wis frm4 = new wis();
frm4.Show();
}
else if ((modflag[0] == 1) && (modflag[3] == 1) && (modflag[4] == 1))
{
wsp frm5 = new wsp();
frm5.Show();
}
else if ((modflag[0] == 1) && (modflag[1] == 1) && (modflag[3] == 1))
{
wrs frm6 = new wrs();
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 104
frm6.Show();
}
else if ((modflag[0] == 1) && (modflag[1] == 1) && (modflag[4] == 1))
{
wrp frm7 = new wrp();
frm7.Show();
}
else if ((modflag[0] == 1) && (modflag[4] == 1) && (modflag[2] == 1))
{
wip frm8 = new wip();
frm8.Show();
}
else if ((modflag[3] == 1) && (modflag[1] == 1) && (modflag[2] == 1))
{
ris frm9 = new ris();
frm9.Show();
}
else if ((modflag[1] == 1) && (modflag[3] == 1) && (modflag[4] == 1))
{
rsp frm0 = new rsp();
frm0.Show();
}
else if ((modflag[1] == 1) && (modflag[2] == 1) && (modflag[4] == 1))
{
rip frm1 = new rip();
frm1.Show();
}
}
}
}
------------------------------------------------------------------------------------------------------
ISP:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 105
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class isp : Form
{
int flag = 0;
public isp()
{
InitializeComponent();
}
private void submit_Click(object sender, EventArgs e)
{
panel1.Visible = false;
if (flag == 1)
{
if (radioButton1.Checked)
{
this.Hide();
incremental frm2 = new incremental();
frm2.Show();
}
else if (radioButton2.Checked)
{
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 106
this.Hide();
prototype frm2 = new prototype();
frm2.Show();
}
}
else if (flag == 2)
{
if (radioButton1.Checked)
{
this.Hide();
prototype frm2 = new prototype();
frm2.Show();
}
else if (radioButton2.Checked)
{
this.Hide();
spiral frm2 = new spiral();
frm2.Show();
}
}
submit.Visible = false;
restart.Visible = true;
}
private void next_Click(object sender, EventArgs e)
{
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 107
reset.Enabled = true;
if (radioButton1.Checked)
{
label1.Text = "Q. Deadline?";
radioButton1.Text = "Strict";
radioButton2.Text = "Not Strict";
flag = 1;
}
else if (radioButton2.Checked)
{
label1.Text = "Q. Deliver and quality?";
radioButton1.Text = "Slow and low";
radioButton2.Text = "Fast and high";
flag = 2;
}
next.Visible = false;
submit.Visible = true;
}
private void quit_Click(object sender, EventArgs e)
{
this.Close();
}
private void reset_Click(object sender, EventArgs e)
{
this.Hide();
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 108
isp frm1 = new isp();
frm1.Show();
}
private void restart_Click(object sender, EventArgs e)
{
this.Hide();
Form1 frm = new Form1();
frm.Show();
}
private void isp_Load(object sender, EventArgs e)
{
}
}
}
----------------------------------------------------------------------------------------
RIP:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 109
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class rip : Form
{
int flag = 0;
public rip()
{
InitializeComponent();
}
private void submit_Click(object sender, EventArgs e)
{
panel1.Visible = false;
if (flag == 1)
{
if (radioButton1.Checked)
{
this.Hide();
rad frm2 = new rad();
frm2.Show();
}
else if (radioButton2.Checked)
{
this.Hide();
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 110
prototype frm2 = new prototype();
frm2.Show();
}
}
else if (flag == 2)
{
if (radioButton1.Checked)
{
this.Hide();
incremental frm2 = new incremental();
frm2.Show();
}
else if (radioButton2.Checked)
{
this.Hide();
prototype frm2 = new prototype();
frm2.Show();
}
}
submit.Visible = false;
restart.Visible = true;
}
private void restart_Click(object sender, EventArgs e)
{
this.Hide();
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 111
Form1 frm = new Form1();
frm.Show();
}
private void reset_Click(object sender, EventArgs e)
{
this.Hide();
rip frm1 = new rip();
frm1.Show();
}
private void quit_Click(object sender, EventArgs e)
{
this.Close();
}
private void next_Click(object sender, EventArgs e)
{
if (radioButton1.Checked)
{
label1.Text = "Q. xxx?";
radioButton1.Text = "123";
radioButton2.Text = "456";
flag = 1;
}
else if (radioButton2.Checked)
{
label1.Text = "Q. Deadline?";
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 112
radioButton1.Text = "Strict";
radioButton2.Text = "Not strict";
flag = 2;
}
next.Visible = false;
submit.Visible = true;
}
private void rip_Load(object sender, EventArgs e)
{
}
}
}
---------------------------------------------------------------------------------------------------------
RIS:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 113
namespace WindowsFormsApplication1
{
public partial class ris : Form
{
int flag = 0;
public ris()
{
InitializeComponent();
}
private void restart_Click(object sender, EventArgs e)
{
this.Hide();
Form1 frm = new Form1();
frm.Show();
}
private void reset_Click(object sender, EventArgs e)
{
this.Hide();
ris frm1 = new ris();
frm1.Show();
}
private void quit_Click(object sender, EventArgs e)
{
this.Close();
}
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 114
private void next_Click(object sender, EventArgs e)
{
if (radioButton1.Checked)
{
label1.Text = "Q. Fast Delivery?";
radioButton1.Text = "Yes";
radioButton2.Text = "No";
flag = 1;
}
else if (radioButton2.Checked)
{
label1.Text = "Q. Urgency of working model?";
radioButton1.Text = "More";
radioButton2.Text = "Less";
flag = 2;
}
next.Visible = false;
submit.Visible = true;
}
private void submit_Click(object sender, EventArgs e)
{
panel1.Visible = false;
if (flag == 1)
{
if (radioButton1.Checked)
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 115
{
this.Hide();
rad frm2 = new rad();
frm2.Show();
}
else if (radioButton2.Checked)
{
this.Hide();
spiral frm2 = new spiral();
frm2.Show();
}
}
else if (flag == 2)
{
if (radioButton1.Checked)
{
this.Hide();
incremental frm2 = new incremental();
frm2.Show();
}
else if (radioButton2.Checked)
{
this.Hide();
spiral frm2 = new spiral();
frm2.Show();
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 116
}
}
submit.Visible = false;
restart.Visible = true;
}
private void ris_Load(object sender, EventArgs e)
{
}
}
}
----------------------------------------------------------------------------------------------------------------
Incremental:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 117
public partial class incremental : Form
{
public incremental()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
Form1 frm = new Form1();
frm.Show();
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
-------------------------------------------------------------------------------------------------------------
Prototype:
using System;
using System.Collections.Generic;
using System.ComponentModel;
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 118
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class prototype : Form
{
public prototype()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
Form1 frm = new Form1();
frm.Show();
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 119
}
}
}
----------------------------------------------------------------------------------------------------------------
RAD:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class rad : Form
{
public rad()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 120
this.Hide();
Form1 frm = new Form1();
frm.Show();
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
-----------------------------------------------------------------------------------------------------------
Spiral:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class spiral : Form
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 121
{
public spiral()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
Form1 frm = new Form1();
frm.Show();
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
-----------------------------------------------------------------------------------------------------------
Waterfall:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
Software Development Strategy with High Quality Design for Large Scale Projects
NMIMS, MUMBAI Page 122
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class waterfall : Form
{
public waterfall()
{
InitializeComponent();
}
private void restart_Click(object sender, EventArgs e)
{
this.Hide();
Form1 frm = new Form1();
frm.Show();
}
private void quit_Click(object sender, EventArgs e)
{
this.Close();
}
}
}