20172304 Experiment Report of Java object-oriented programming
-Course Name: "Program design and data Structure"
-Student class: 1723 classes
-Student Name: He Zhixuan
-Student Number: 20172304
-Experimental Time: April 18, 2018
-Experiment Name: "Java Object-oriented programming"
-Instructor: Wang Zhiqiang teacher
Experimental content
Initial mastery of unit testing and TDD
Understanding and mastering object-oriented three elements: encapsulation, inheritance, polymorphism
Initial mastery of UML modeling
Familiarity with S.O.L.I.D principles
Understanding Design Patterns
Complete the Blue Ink Cloud (1)-(5) experiment.
Experimental requirements
- Complete the experiment two "Java Object-oriented programming" in the content.
The eclipse-related content reference INTELLJ idea Easy tutorial replaced by idea implementation.
The rules of Experimental examination
3 points per lab test
Do not submit the experiment process will deduct one point (five times this week, as long as there is a disqualification will be deducted points)
The experimental report will add 1 points (mainly the problems encountered and the resolution process).
Experiment process Software preparation:
- Ieda
StarUML
Experimental content:
Initial mastery of unit testing and TDD
Understanding and mastering object-oriented three elements: encapsulation, inheritance, polymorphism
Initial mastery of UML modeling
Familiarity with S.O.L.I.D principles
Understanding Design Patterns
Specific content of the experiment
- Experiment one: Create the Myunit class and test the Myunit class for bounds checking.
- Experiment two: Learn the StringBuffer class and test it. 、
- Experiment three: Let the system support long type, and add test code.
- Experiment Four: Design the complex class (plural class) so that it supports subtraction. There are also Getter,setter, and the ToString method.
Experiment Five: Realize the code in experiment two, use STARUML to model the code of Experiment Two, send class diagram, add number watermark.
Experimental results
Experiment One
Experiment Two
Experiment Three
Experiment Four
Experiment Five
Problems encountered in the experiment
- Question: Because the teacher gives the material is very detailed, therefore this experiment did not have the big question, only when carries on the experiment four, uses the assertequals compares two double type data the time to appear the error.
Problem Solution: Later consulted Zhangxu seniors, at his prompt, the double type of comparison changed to a string type comparison.
OtherAfter this experiment, I realized that even if the basic knowledge mastered, also do not necessarily be able to do a good job programming, sometimes programming needs not only knowledge, but also some inspiration, in short, programming also need to be flexible, not immutable.
Resources
Java Programming and Data Structure Tutorial (second edition)
- Tutorial on Java Programming and data Structure (second edition) Learning Guide
- An explanation of the experiment two Java object-oriented programming
Idea Easy Tutorial
20172304 Experiment Report of Java object-oriented programming