Beijing Institute of Electronic Technology (BESTI)
Real Inspection report
Course: Java Programming Class: 1353 Name: Guo Haoxue No.: 20135327
Score: Instructor: Lou Jia Peng Experimental Date:
Experiment level: Preview degree: Experiment time:
Instrument Group: Compulsory/Elective: Elective experiment number: 2
Experiment Name: Java Object-oriented programming
Experimental purposes and requirements:
1. preliminary master unit testing and tdd
2. inherit polymorphic
3. preliminary master Span style= "text-decoration:underline;" >UML modeling
4. familiar with S.O.L.I.D principle
5. Understanding Design Patterns
Experimental instrument:
First, the experimental process
Use Umbrello to complete encapsulation, inheritance, polymorphism ...
Implementing the complex class complex using TDD method design off
Second, the operation
Iii. problems encountered/how to resolve
1. Laboratory building tools have problems, has not been!!!
Solution: Use the system comes with the tool
2. There is a division of the plural, mainly the divisor cannot be zero
WORKAROUND: If else consider using exceptions
Four, the experiment code:
- Pseudo code:
(1). Establish Complex class
(2). Design Subtraction Operations
Addition: (A+BI) + (C+di) = (a+c) + (b+d) I
Subtraction: (A+BI)-(C+di) = (a-c) + (b-d) I
Multiplication: (A+BI) * (C+di) = (AC-BD) + (AD+BC) I
Division: (A+BI)/(C+di) = ((AC+BD) + (AD-BC) i)/(c²+d²)
(3) Output test
Five, PSP time statistics
Statistics are missing, totaling three hours.
Steps |
Take |
Percentage |
Demand analysis |
10 minutes |
|
Design |
20 minutes |
|
Code implementation |
115 minutes |
|
Test |
5 minutes |
|
Analysis Summary |
30 minutes |
|
Vi. Analysis and summary
Feel the first problem on the Internet, other feelings are very good!! Especially when designing the code!!
Java Second Test report