Course: "Program Design and Data Structure"
Class: 1723
Name: Wang Yuhan
Student ID: 20172323
Experiment Teacher: Wang Zhiqiang
Experiment Date: April 22, 2018
Compulsory/Elective: Compulsory
Experimental content
Getting started with unit testing and TDD
Understand and master the three elements of object-oriented: encapsulation, inheritance, polymorphism
Preliminary mastery of UML modeling
Become familiar with SOLID principles
Learn about design patterns
Complete the experiments (1)-(5) on the blue ink cloud.
Experimental process and results
Experiment 1
- Completion of unit testing is required and use of JUnit test cases (normal cases, error cases, edge cases)
- The experimental results are shown in the figure:
Experiment 2
- Study and learn StringBuffer in the way of TDD, and learn to write JUnit test cases by yourself
- The experimental results are shown in the figure:
Experiment 3
- Expand the design pattern examples, realize the application of OCP principles and DIP principles, and have a preliminary understanding of design patterns
- The experimental results are shown in the figure:
Experiment 4
- Develop a complex class Complex in a TDD manner
- There was an error in submitting the screenshot in this experiment, and now resubmit
- The experimental results are shown in the figure:
Experiment 5
- Modeling the code in the experiment using StarUML
- The experimental results are shown in the figure:
Problems encountered during the experiment and the solution process
Problem 1: Not particularly understandable about SOLID principles
Problem 1 solution:
|
Through this blog , I generally have some perceptual understanding of the concept.
Other (perception, thinking, etc.)
This experiment is mainly done step by step according to the tutorial. In fact, it is not as difficult as imagined, and there are no major problems in the process of painting the scoop, but this experiment can actually learn a lot. thing.
References
Java Programming and Data Structure Tutorial (Second Edition)
"Java Programming and Data Structure Tutorial (Second Edition)" study guide