183
社区成员
The Link Your Class | https://bbs.csdn.net/forums/MUEE308FZ |
---|---|
The Link of Requirement of This Assignment | https://bbs.csdn.net/topics/601188617 |
The Aim of This Assignment | Develop a Bobing software |
MU STU ID and FZU STU ID | <19105860_831902226> |
MU STU ID and FZU STU ID of my partner | <19103557_831902230> |
------------------------------------------------------
https://weibo.com/tv/show/1034:4690545776459871?from=old_pc_videoshow
https://github.com/ArrXiao/EE308_LAB4
------------------------------------------------------
Personal Software Process Stage | Estimated Time (minutes) | Actual Time (minutes) |
---|---|---|
· Estimate | 60 | 120 |
· Analysis | 30 | 90 |
· Design Review | 20 | 10 |
· Coding Standard | 30 | 30 |
· Design | 60 | 120 |
· Coding | 1200 | 1800 |
· Code Review | 30 | 60 |
· Test | 30 | 60 |
· Postmortem&Process Improvement | 60 | 30 |
· Test Report | 120 | 60 |
Total | 1640 | 2280 |
------------------------------------------------------
Number of days | New code(line) | Cumulative code (line) | Learning time of the day (hours) | Accumulated learning time (hours) | Important growth |
---|---|---|---|---|---|
1 | 0 | 0 | 10 | 10 | 120 |
2 | 0 | 0 | 10 | 20 | 120 |
3 | 227 | 227 | 10 | 30 | 120 |
4 | 179 | 495 | 8 | 38 | 120 |
5 | 388 | 883 | 6 | 44 | 120 |
6 | 152 | 1035 | 3 | 47 | 120 |
7 | 30 | 60 | 1 | 48 | 120 |
------------------------------------------------------
We chose JAVA as the programming language of the lab, and we learned about JAVA design pages and games in the first two days of the project
We first divided the experiment into five modules
1 and 2 are the most critical in the entire programming process. The jump to the page determines whether the game works properly, and the insertion of images and buttons determines the flow of the game. For aesthetic reasons, we chose not to use the original buttons of the Java window, but to use small images as buttons. For the basic image background and button image, we continue to use the texture used in ink Knives for UI.
For 3, We wrote a Player class that solves this problem. In this class, We implemented its constructor and several GET functions from last semester. When a button on the page is triggered, the relevant program will run, and this program will call this class, so that each player will randomly generate dice results and get awards and corresponding points through the function call. There is also an array to keep track of each player's results and rank them by sort at the end.
For 4, This module is really relatively simple, my teammates and I had a plan for some docking of the two at the beginning of the project.
For 5, Although this step seemed simple, it took me and my teammates a lot of time to coordinate the code.
------------------------------------------------------
The backbone of the whole code is to realize the page jump through the button, and then provide the game results through random numbers. Click "开始游戏" on the first home screen and you will be redirected to the selection screen. On this page, players can view the rules or select single or multiplayer games. Each page has a back key.
In single player games, the process of shaking the dice is shown by switching between images, but the game results are already generated by clicking "开ROLL" on the previous page, and then the game results are displayed.
Multiplayer games are derived from single-player games. In simple terms, the single player game is repeated, and records of multiple multiplayer games are saved and ranked at the end.
------------------------------------------------------
The first is the mainInterface.java file, which is the first page to enter the game.
Click "开始游戏" on the previous page to open the window programmed by the next file named select.java.
Then, clicking on "规则介绍" takes you to the window programmed by the rule-java file.
Then, clicking on "单人游戏" takes you to the window programmed by the rule-java file.
After clicking "开ROLL", After clicking "STOP", the game progress page will appear
After clicking "STOP", the results of the game will be displayed
On the other hand, if ”多人游戏“ is selected, a different page is taken to.
Finally, by clicking on "ROLL", each player can get their own results, which can be played by up to six people.
------------------------------------------------------
In this lab, my teammate and I have obtained:
1.Review basic knowledge of JAVA.
2.More familiar with the cooperation with teammates
3.The way of thinking about more complex situations and the way of thinking about solving problems.
4.How to use programming language to implement applications
5.Experience the life of a programmer
· During the experiment, my teammates and I had different opinions on the programming direction of the application. I personally preferred to develop wechat mini program, while my teammates hoped to design the application through JAVA programming. Finally, after intense discussion and physical contact, we decided to use his plan. The main reason is also to consider the review of Java programming and the target tendency of this experiment.
· On the other hand, my teammates and I spent a lot of time learning how to code Windows and game logic in JAVA, even though we had a good JAVA background. We're kind of clueless in this regard. So in the first few days of the project, both of us started studying almost as soon as we got up. In a way, both of us have greatly strengthened our ability to study independently and master JAVA.
· In the end, when my team and I put our code together for a final test, we ran into a big test. The lack of communication during the writing of the code resulted in many connection problems when the code was finally integrated. Some variables are not generic, and some functions cannot call wait. So we spent half a day modifying the integration code. This experience, while exhausting, is yet another reminder of the importance of writing detailed comments.
------------------------------------------------------
------------------------------------------------------
Indentation: For indentation, In addition to the auto-indent processing code within DEV, I also corrected it manually.
Variable naming: In terms of variable names, We mostly use plain English abbreviations and _ to make it easier for others to read the code.
Maximum number of characters per line: The maximum number of characters per line is based on the keyword array declared at the beginning of the code, which is not exceeded in subsequent code, and all code is basically limited to reasonable and comfortable positions.
Maximum number of function lines: In this project , the maximum number of function lines is 111.
Function and class naming: When naming functions and classes, We start with the most direct. Name by using words and abbreviations together.
constant: We always define constants to help me implement and standardize my coding. On this project, We relied less on constants than We had in the past so that the code didn't feel bloated.
Blank line rule: In our rules, We always leave a blank line between two unrelated blocks of code. In some of the longer code, We also used blank lines to make the code a little clearer, but this also caused our code to look very long.
Annotation rules: All the annotations in our code are used to help others understand our code better.
Space before and after operator: We always put a single white space before and after operator which makes code more readable.
Other rules: We think there are no other rules for our code.