zoukankan      html  css  js  c++  java
  • 本周psp个人作业

    • 计划--用一天的时间来做这个项目
    • 需求分析--作为一个观众,我想要知道每局的比分,以便我更了解比赛情况。
    • 生成设计文档--用类图来进行说明。
    • 设计复审---无
    • 代码规范--3H
    • 具体设计--建立数据库,通过三层构架将数据库里的每队每局比分拿出来显示在UI层上
    • 具体编码
    • 界面显示效果
    • 具体代码如下

    UI层

    • using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Web;
      using System.Web.UI;
      using System.Web.UI.WebControls;
      using System.Text;
      using BLL;
      using Model;
      using Common;

      public partial class player : System.Web.UI.Page
      {
          private StudentBll bll = new StudentBll();
          protected void Page_Load(object sender, EventArgs e)
          {
              List<Juticahngfen> juti = bll.GetAllvoll();
              StringBuilder sb = new StringBuilder();

              sb.Append("<div style='position:absolute;background-color: #669999; font-family: 隶书;font-size:20px; text-align:center;'><table border='1px;solid'style='500px;height:600px'><tr><th>编号</th><th>局数</th><th>队名</th><th>得分</th></tr>");
              foreach (var item in juti)
              {
                  sb.Append(string.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td></tr>", item.ID, item.jushu, item.duiming, item.defen));
              }
              sb.Append("<tr><td colspan='4'><a href='player.aspx'>最终比分</a></td></tr></table>");
              Response.Write(sb.ToString());



          }
      }

    • 代码复审----2h
    • 测试--0h
    • 测试报告--无
    • 计算工作量--5h
    • 事后总结,并提出改进意见

    在本周周三开始进行三次架构的设计,本周周六下午开始做的,在开始之前思考了上周的解决方法,代码不会打,所以就仿了ASP.NET上面查询详情的做法,可以用三层架构把数据显示在界面上,在做的过程中一直没能运行成功,花费了一个多小时的时间,最后请教了我的两位室友,她们帮我解决了问题,让我意识到结对编程是对于学习是很有帮助的。所以要多和同学交流。由于我的完成作业的时间比较匆忙,所以在最后比分的显示中用的是控件,没有用三层架构。所以没有具体代码。希望以后多多改进。并且我对算法比较生疏,所以在每一局小分的情况中我没有做。希望下一周请教同学尝试一下。

  • 相关阅读:
    Intent
    What should we do next in general after collecting relevant data
    NOTE FOR Secure Friend Discovery in Mobile Social Networks
    missing pcap.h
    after building Android Source code
    plot point(one column)
    When talking to someone else, don't infer that is has been talked with others at first. It may bring repulsion to the person who is talking with you.
    进程基本知识
    Python input和raw_input的区别
    强制 code review:reviewboard+svn 的方案
  • 原文地址:https://www.cnblogs.com/mnge/p/6218698.html
Copyright © 2011-2022 走看看