PSP Personal (Viewer interface)

Source: Internet
Author: User

Requirement: As an audience, I want to know the score of a match in order to understand the game. (Condition of satisfaction: The result score of each inning is accurate)

Requirement Analysis: Implement the score of each board in the query database and display it on the interface.

To create a design document:

The basic function of software is realized by using three-layer architecture.

Design review: Self-review completed. The colleague review was not completed.

Code specification: Code style principle, concise, easy to read, no ambiguity.

Indent: four spaces.

Line width: No more than 100 characters.

Parentheses: In complex conditional expressions, the logical precedence is clearly represented by parentheses.

Line break with blank {} lines: (Plus code)

Branch: Do not put multiple statements on one line.

Named:

Camel hump nomenclature: Word ligatures without a divider each word capitalized first letter

Class name and interface name capitalize the first letter of a word

Note: To add the necessary comments.

Specific design:

The approximate interface is shown below

Click Refresh to get the current in-field score situation.

The basic activity chart is as follows

Specific code:

  //Get Database Data//Query the first few            intx = A +b; //x = 3;            stringsql ="Select *from p Limit"+x+""; Mysqldatareader Dr= Mysqlhelpera.executereader (SQL,NULL); if(Dr. HasRows) {if(Dr. Read ()) {//first inningDiyiju1.text = dr["chang1"].                    ToString (); Diyiju2.text= dr["chang2"].                    ToString (); Changneibifen1.text= dr["Fen1"].                    ToString (); Changneibifen2.text= dr["Fen2"].                    ToString (); intAa=int. Parse (dr["chang1"].                    ToString ()); intBB =int. Parse (dr["chang2"].                    ToString ()); if(AA >BB) {Diyiju.text= Txtduiming1.text +"win"; }                    Else{Diyiju.text= Txtduiming2.text +"win"; }                }                if(Dr. Read ()) {//second inningDierju1.text = dr["chang1"].                    ToString (); Dierju2.text= dr["chang2"].                    ToString (); Changneibifen1.text= dr["Fen1"].                    ToString (); Changneibifen2.text= dr["Fen2"].                    ToString (); intAA =int. Parse (dr["chang1"].                    ToString ()); intBB =int. Parse (dr["chang2"].                    ToString ()); if(AA >BB) {Diyiju.text= Txtduiming1.text +"win"; }                    Else{Diyiju.text= Txtduiming2.text +"win"; }                }                if(Dr. Read ()) {//third inningDisanju1.text = dr["chang1"].                    ToString (); Disanju2.text= dr["chang2"].                    ToString (); Changneibifen1.text= dr["Fen1"].                    ToString (); Changneibifen2.text= dr["Fen2"].                    ToString (); intAA =int. Parse (dr["chang1"].                    ToString ()); intBB =int. Parse (dr["chang2"].                    ToString ()); if(AA >BB) {Diyiju.text= Txtduiming1.text +"win"; }                    Else{Diyiju.text= Txtduiming2.text +"win"; }                }                if(Dr. Read ()) {//Fourth InningDisiju1.text = dr["chang1"].                    ToString (); Disiju2.text= dr["chang2"].                    ToString (); Changneibifen1.text= dr["Fen1"].                    ToString (); Changneibifen2.text= dr["Fen2"].                    ToString (); intAA =int. Parse (dr["chang1"].                    ToString ()); intBB =int. Parse (dr["chang2"].                    ToString ()); if(AA >BB) {Diyiju.text= Txtduiming1.text +"win"; }                    Else{Diyiju.text= Txtduiming2.text +"win"; }                }                if(Dr. Read ()) {//Fifth inningDiwuju1.text = dr["chang1"].                    ToString (); Diwuju2.text= dr["chang2"].                    ToString (); Changneibifen1.text= dr["Fen1"].                    ToString (); Changneibifen2.text= dr["Fen2"].                    ToString (); intAA =int. Parse (dr["chang1"].                    ToString ()); intBB =int. Parse (dr["chang2"].                    ToString ()); if(AA >BB) {Diyiju.text= Txtduiming1.text +"win"; }                    Else{Diyiju.text= Txtduiming2.text +"win"; }                }                                          }
code One-layer version

Code review: Completed

Test: Completed

Test report: The basic query function can be implemented.

Calculation effort:

Plan

Estimated time elapsed

Actual elapsed time

Estimate how long this task will take

145min

120min

Development

105min

100min

Demand analysis

10min

5min

Creating a design Document

5min

5min

Design Review

15miin

5min

Code specification

5min

10min

Specific design

20min

20min

Specific code

40min

50min

Code review

10min

5min

Test

30min

20min

Test report

5min

5min

Computational effort

20min

10min

Summarize and propose improvement plan afterwards

5min

5min

After the summary and proposed improvement plan: Basic performance has been achieved, but has not been changed to three-tier architecture format.

PSP Personal (Viewer interface)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.