The Link Your Class https://bbs.csdn.net/forums/MUEE308FZU202201?typeId=519086
The Link of Requirement of This Assignment https://bbs.csdn.net/topics/608859318
MU STU ID and FZU STU ID 20124104_832001205
Teammate’s MU STU ID and FZU STU ID 20124058_832001227
Teammate’s blog link https://bbs.csdn.net/topics/609140194
GitHub link https://github.com/anasappp/TeamBobing
Video demo link https://www.bilibili.com/video/BV1w14y1W7TD/

Directory

  • Key functions and programming thinking
    • Basic page switching
    • The number of people playing multiplayer
    • Automatically generate random results
    • Result list
  • Photo showing pair working
  • Experience in pair programming
  • Big events
  • PSP
  • GitHub link and commit record
  • Video

Key functions and programming thinking

Basic page switching

  • key function:By setting control-button, the function of entering the corresponding interface of the application when clicking the button is realized.
  • programming thinking
  • code:
<Buttonandroid:id="@+id/button"android:layout_width="264dp"android:layout_height="165dp"android:layout_alignParentLeft="true"android:layout_alignParentBottom="true"android:layout_marginLeft="78dp"android:layout_marginBottom="39dp"android:background="#00000000"android:text=""tools:ignore="MissingConstraints" />
public class startgame extends AppCompatActivity {Button button;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.startgame);button = (Button)findViewById(R.id.button);button.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {Intent intent = new Intent();intent.setClass(startgame.this, choooooose.class);startActivity(intent);}});}
}

The number of people playing multiplayer

  • key function: When a multiplayer room is created, the number of throws in a round is generated based on the number entered by the user.
  • programming thinking:
  • code:
    <EditTextandroid:id="@+id/edt_test"android:layout_width="wrap_content"android:layout_height="60dp"android:layout_alignParentLeft="true"android:layout_alignParentBottom="true"android:layout_marginLeft="118dp"android:layout_marginBottom="276dp"android:hint="@string/edt_test"android:inputType="number"android:textSize="18sp" />
EditText num = findViewById(R.id.edt_test);
int number = Integer.parseInt(et_age.getText().toString());

Automatically generate random results

  • key function: Each cast of six dices produces a random result (there are 6^6 results in total). Corresponding results will be generated automatically for each throw, such as: zhuangyuan (hongliubo), tanhua, bangyan and so on.
  • programming thinking:
  • code:
        rollButton.setOnClickListener(new View.OnClickListener(){public void onClick(View v){//                产生随机数Random rand = new Random();int randNumber1 = rand.nextInt(6)+1;int randNumber2 = rand.nextInt(6)+1;int randNumber3 = rand.nextInt(6)+1;int randNumber4 = rand.nextInt(6)+1;int randNumber5 = rand.nextInt(6)+1;int randNumber6 = rand.nextInt(6)+1;//                获取对ImageView对象的引用ImageView diceImage1 = findViewById(R.id.dice_1);ImageView diceImage2 = findViewById(R.id.dice_2);ImageView diceImage3 = findViewById(R.id.dice_3);ImageView diceImage4 = findViewById(R.id.dice_4);ImageView diceImage5 = findViewById(R.id.dice_image5);ImageView diceImage6 = findViewById(R.id.dice_6);int drawableResource1,drawableResource2,drawableResource3,drawableResource4,drawableResource5,drawableResource6;
//                将随机数与对应的图片资源联系起来switch (randNumber1){case 1: drawableResource1 = R.drawable.dice_1; break;case 2: drawableResource1 = R.drawable.dice_2; break;case 3: drawableResource1 = R.drawable.dice_3; break;case 4: drawableResource1 = R.drawable.dice_4; break;case 5: drawableResource1 = R.drawable.dice_image5; break;case 6: drawableResource1 = R.drawable.dice_6; break;default:throw new IllegalStateException("Unexpected value: " + randNumber1);}

Result list

  • key function: Multiplayer games produce a result list based on the number of players in a round after all players have cast their dice.
  • programming thinking:
  • code:
    <TextViewandroid:id="@+id/array"android:layout_width="wrap_content"android:layout_height="wrap_content"android:background="#e0000000"android:textColor="#FAFAF9"android:textSize="70dp"android:layout_gravity="center"/>
                TextView tv = (TextView)findViewById(R.id.array);//获取一个TextViewString ct = "";//定义一个字符串String s = "历史记录\n";if (round == N){for (int m=0;m<N;m++){for(int j=0;j<2;j++){ct = ct + list[m][j];//数组拼接成字符串if (j == 0){ct = ct +"\u0020\u0020";}}ct = ct + "\n";}round = 0;ct = s +ct;}tv.setText(ct);//在TextView中显示数组内容round = round + 1;

Photo showing pair working

Experience in pair programming

  • Time Planning: Individual activities take time to plan, and so does working in pairs. The two of you should list your free time within the project cycle, then choose overlapping periods and plan your progress within these periods.
  • Communication: Communication is definitely one of the most important aspects of pairing. First of all, timely communication can avoid a lot of unnecessary rework. Secondly, the information collected by both parties can be effectively used in the communication. At the same time, we need to distribute work equally through communication.

Big events

  • Preliminary preparation: Since we were developing software for the first time, we first had to download the appropriate tools. The main tools we use this time are: android studio, jdk, SDK and so on. These tools are not downloadable like normal apps, they must be configured correctly when installed before they can be used later. So, after spending a lot of time looking for tutorials on how to configure these tools, we finally came to the conclusion that we should look for tutorial videos of the same version of the tool online and learn step by step if we need to, even if there is a mistake, the tool may not work in the end.
  • Implement different random results to produce the corresponding prize or not winning: We know that the six dices produce 6^6 results in a random situation, so it is impossible to enumerate each result with the corresponding awards. So we choose to use the if-else statement and count the number of times that the number “four” occurs in the result. But the logic is still complicated, and we spent a lot of time figuring it out.
  • Duplication of work due to miscommunication: In the stage of combining materials of this cooperation project, due to inappropriate file name, a lot of time was spent on modifying the name of the sub-project. What I mean is that even some seemingly insignificant things without effective communication will magnify their adverse effects in cooperation. Therefore, we should pay attention to every detail in cooperation.

PSP

Personal Software Process Stages Estimated Time/minutes Completed Time/minutes
Planning 30 40
Estimate 1240 1770
Development 120 150
Analysis 120 110
Design Spec 30 40
Design Review 20 40
Coding Standard 10 20
Design 40 50
Coding 360 720
Code Review 60 100
Test 100 300
Reporting 100 120
Test Report 20 30
Size Measurement 10 20
Postmortem&Process Improvement 20 30
total 1240 1770

GitHub link and commit record

https://github.com/anasappp/TeamBobing

Video

https://www.bilibili.com/video/BV1w14y1W7TD/

EE308 Lab2-2相关推荐

  1. EE308 LAB2

    EE308 LAB2 LAB2 Progress Logging Ⅰ. Use Git to conduct version control 1. Create Github Repository 2 ...

  2. 操作系统lab2实验总结——Part1

    ​ 这是MIPS虚拟映射布局图,在接下来的实验中,我们需要特别注意的地址分别是kuseg和kseg0区,首先列出这两个区域的意义. MIPS虚存映射布局 32位的MIPS CPU最大寻址空间为4GB( ...

  3. CS144 lab2 笔记

    CS144 lab2 笔记 介绍 在lab0中,我们实现了一个ByteStream. 在lab1中,实现了一个重组字符片段的StreamReassembler,重组收到的字符片段,并且将排序好的字符串 ...

  4. 操作系统实验_Chcore -- 上交IPADS操作系统银杏书配套Lab实验笔记 - Lab2内存管理(一)...

    实验为IPADS<现代操作系统原理与实现>配套实验,慕课上有完整的课程教学视频,以下为个人实验过程和踩坑记录. 物理内存布局 当bootloader和内核被加载到内存中的时候,物理内存到底 ...

  5. CSAPP Lab2 实验记录 ---- Bomb Lab(Phase 1 - Phase 6详细解答 + Secret Phase彩蛋解析)

    文章目录 Lab 总结博客链接 实验前提引子 实验需要指令及准备 Phase 1 Phase 2 Phase 3 Phase 4 Phase 5 Phase 6 Phase Secret(彩蛋Phas ...

  6. 北航os实验lab2笔记

    数据结构 这里讲的内容主要是queue.h里的内容. 值得注意的主要是pp_link,在pp_link里有一个struct Page ** le_prev,这个指针指向的是前一个结点的le_next, ...

  7. Stanford University CS144 Lab2 The TCP Receiver

    文章目录 前引 Lab2 The TCP Receiver 获取实验文档+调试方法介绍 1.Overview(总览) 2.Getting started(开始) 编译报错 获取LIBPCAP-DEV ...

  8. ucore lab2

    UCORE实验2 实验目的 理解基于段页式内存地址的转换机制 理解页表的建立和使用方法 理解物理内存的管理方法 实验内容 本次实验包含三个部分.首先了解如何发现系统中的物理内存:然后了解如何建立对物理 ...

  9. ICC学习——LAB2

    ICC学习--LAB2设计规划 学习目标: 1.定义核心和放置的行结构 2.定义信号,PG,corner pad的位置 3.插入filler pad cell 4.手动放置macro 5.应用宏放置约 ...

  10. ICC 图文学习——LAB2:Design Planning 设计规划

      这一步也可以叫floorplan(布局规划),对设计进行布局规划.floorplan的合理性直接关系到芯片的时序收敛.布线畅通.电源稳定以及良品率等.这部分内容非常重要,只有这一步做好了,后面成功 ...

最新文章

  1. 数据结构与算法:22 精选练习50
  2. DeepMind训练AI玩足球,风骚走位比中国男足都强(狗头)
  3. 注册和登陆与数据库的链接
  4. Python连接MYSQL,并做查询操作
  5. PyTorch模块类
  6. 更新项目经常使用的Linux命令
  7. 网页中查看pdf文档
  8. openwrt nas_NAS里整个软路由
  9. TCxGrid 把列移上移下。
  10. 单webview上拉刷新下拉加载
  11. php7.2 函数安装,讲解PHP7.2源码安装
  12. 汇编语言c标志位减法,5.2.3-2减法指令 - 汇编语言教程
  13. 论文《基于FPGA 的CFAR 设计与实现》复现
  14. 微信消息模板换行符转义问题处理
  15. python脚本1 - PPT导出为图片(WinLinux)
  16. 【bzoj4826】[Hnoi2017]影魔
  17. 三级等保测评都有哪些环节?
  18. 案例 7-1.3 寻找大富翁(25 分)
  19. ARCGIS中坐标转换及地理坐标、投影坐标的定义
  20. Oracle数据库怎么调大字体,CFree怎么调大字体 设置字体大小的方法

热门文章

  1. 传统产业要向数字化转型发力
  2. 大厂技术实现 | 爱奇艺文娱知识图谱的构建与应用实践 @自然语言处理系列
  3. AC Dream1069
  4. 做小红书推广快速涨粉的技巧_云媒易
  5. 小杜滑铲 DFS 最长路径
  6. 威盛wm8880 android4.2系统,还能更低吗? 威盛推出249元平板新芯片组
  7. php判断用户是微信浏览器还是其他浏览器,PHP区分企业微信浏览器|普通微信浏览器|其他浏览器...
  8. 《TCP IP协议 详解》思考总结 · 三
  9. QT报错:The inferior stopped because it received a signal from the Operating System.
  10. 齐齐哈尔鹤城计算机学校,齐齐哈尔阳光学校