PSP0级报告

         1.计划

1.1需求描述

       根据老师的要求,用程序解决寻找一数组中最大子数组的问题。

1.2估计开发时间

       五天。

1.3填写项目数据

      根据自己的编写程序,生成相应的结果。

1.4填写时间记录日志

     

             1.开发

2.1设计程序

通过定义个数组然后通过运用循环语句和相应的按钮生成相应的程序。

2.2设计实现

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 WindowsFormsApplication5
{
    public partial class Form1 : Form
    {
        int []ArrayData =new int [6];
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            lblDataFirst.Text = "";
            Random arr = new Random();

            for (int i = 0; i < 6; i++)
            {
                ArrayData[i] = arr.Next(50);
                lblDataFirst.Text += ArrayData[i].ToString() + " ";
            }
            Array.Sort(ArrayData);
            Array.Reverse(ArrayData);
            foreach (int x in ArrayData)
            {
                lblDataSecond.Text += x + "  ";
            }

            int M, N, m;
            M = ArrayData[0];
            N = ArrayData[1];
            m = M + N;
            lblDataThird.Text += m;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            lblDataFirst.Text = " ";
            lblDataSecond.Text = " ";
            lblDataThird.Text = " ";
        }
    }
}

2.3编译程序,修复并记录所发现的bug,并填写缺陷记录日志

   1.总结

本程序大约花费了四天的时间完成,在编译过程中,反应了自己的许多问题,比如在编写代码中出现的语句语法错误,忘记或多加了符号,以及在调试过程中出现的debug过期等问题。但已初步完成。

猜你喜欢

转载自www.cnblogs.com/lwan/p/9751406.html
psp
今日推荐