2062326 the experiment report of Java object-oriented programming

Source: Internet
Author: User

Beijing Institute of Electronic Technology (BESTI)

Real Inspection report

Course: Program Design and data structure class: 1623 Name: Qili No.: 20162326

Score: Instructor: Lou Jia Peng/Wang Zhiqiang experimental date: April 14, 2017

Experimental classification: Non-classified preview degree: Excellent experimental time: 2 Hours

Instrument Group: Compulsory/Elective: compulsory test number: 01

Experiment Name:

Java Object-oriented programming

Experimental purposes and requirements:

1. Students who do not have a Linux base are advised to start with the Linux basics (new version) Vim Editor Course 2. Complete the experiment, write the experiment Report, the experiment report is published in the blog Garden in Blog, note that the experiment report focuses on Run Results, encountered the problem(Tools find, install, use, program edit, Debug, run, etc.), Solutions(empty methods such as "Check Network", "Ask classmates", "reading" and so on are 0 points) and Analysis(What can be learned from it, what gains, lessons, etc.). The report can refer to the guidance of Fan Fei Dragon Teacher 3. Plagiarism is strictly forbidden, and the results of the experiment of the perpetrator are zero, and other punitive measures are added. 4. please first in the laboratory building in the ~/Code directory with their own school number to create a directory, code and UML diagram to put in this directory, no study number will require redo, and then follow the following steps to practice

experiment contents, steps and Experience:

1. Initial mastery of unit testing and TDD2. Understand and master the object-oriented three elements: encapsulation, inheritance, polymorphism 3. Initial mastery of UML modeling 4. Familiarity with S.O.L.I.D principles 5. Understanding Design Patterns

Experience: Do high school, more practice more thinking

(i) design pattern preliminary (1) S.O.L.I.D principle
    • SRP (Single Responsibility Principle, sole responsibility principle)
    • OCP (open-closed Principle, open-closed principle)
    • LSP (Liskov substitusion Principle,liskov substitution principle)
    • ISP (Interface segregation Principle, interface separation principle)
    • DIP (Dependency inversion Principle, dependency inversion principle)

-we see that the code conforms to the OCP principle by adding a layer of abstraction. Code has a good extensibility, maintainability, the price is more code, inefficient.
Design patterns beginners are prone to overuse them, leading to over-design, that is to say, complying with dry and OCP is certainly good, but will appear yagni (you aren ' t gonna need it and you won't need it) issues.
The dry principle and the Yagni principle are not fully compatible. The former pursues "abstraction" and asks for a common solution, while the latter pursues "fast and provincial", which means not focusing on abstraction, because it is likely that you will not need it. How to balance it?

There is a rule of three (three principles): When you use a function for the first time, you write a specific solution, and the second time you use it, you copy the last code (in violation of dry), and the third time, you begin to "abstract" and write a general-purpose solution.

(b), unit test submitted the last three test cases were passed by the
    • When you want to use the program to solve the problem, you will write three kinds of code: pseudo-code, product code, test code, the purpose of this experiment is to let us develop such a good habit of writing code, first write pseudo-code, and then a specific programming language translation is the product code, and finally write test code to detect the product code problems and vulnerabilities
    • Attached test

2062326 the experiment report of Java object-oriented programming

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.