个人第3次作业:结对编程
项目
项目地址:https://github.com/Zrz458/PairProgramming.git
结对伙伴地址:https://github.com/ZW1913/RollCallSystem.git
PSP

项目
项目架构

附加功能

-
3秒后自动随机点名
思路:先开始随机显示学生姓名,新建一个线程,在3秒后停止随机显示学生姓名
private void autoButton_Click(object sender, EventArgs e) { timerCallName.Start(); Thread thread3 = new Thread(() => { string curTime = (DateTime.Now.Second + 3).ToString(); while (DateTime.Now.Second.ToString() != curTime) { } timerCallName.Stop(); }); thread3.Start(); } -
学生信息排序(正序,逆序皆可)
思路:每点击一次排序按钮,就进行排序,并且更改flag的值(flag主要控制排序的规则——学号正序排序还是逆序排序)
progressName.Value =0; //获取学生数据源 StudentDAO stuDao = new StudentDAO(); stuList = stuDao.getAllStudents(); if (flag) { stuList.Sort((x, y) => { if (int.Parse(x.Id) < int.Parse(y.Id)) { return -1; } else if (int.Parse(x.Id) > int.Parse(y.Id)) { return 1; } else return 0; }); flag = false; } else { stuList.Sort((x, y) => { if (int.Parse(x.Id) > int.Parse(y.Id)) { return -1; } else if (int.Parse(x.Id) < int.Parse(y.Id)) { return 1; } else return 0; }); flag = true; } -
显式学生总人数
点击加载按钮后,给名为studentsNum 的Label赋值为学生人数
//显式学生人数 this.studentsNum.Text = "学生人数:" + stuDao.getStudentRecordsNums();
克隆、修改代码、提交代码
新建仓库

提交本人的代码
// clone 、add、commit 过程省略
40184@Rongz MINGW32 /e/RongGit/201731024233 (master)
$ git push
fatal: HttpRequestException encountered.
▒▒▒▒▒▒▒▒ʱ▒▒▒▒
Username for 'https://github.com': Zrz458
784Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (9/9), 1.50 KiB | 513.00 KiB/s, done.
Total 9 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), done.
To https://github.com/FXXK458/-.git
467e942..28ab9b6 master -> master
接收张伟的拉取请求

提交

结队丑照


浙公网安备 33010602011771号