Concluded OO - fourth units Summary

Summary fourth cell OO    

A. Job analysis framework.

1. The first job

       The job requires a complete UML class diagram queries.

       The difficulty lies in the initial contact with UML, UML needs to be a certain degree of learning and understanding.

       The main idea is followed by classification and hierarchical processing each element get passed in accordance with its type, from top to bottom, to find all the interfaces and classes, and build Myclass MyInterface, to manage classes and interfaces of the underlying elements and inherit the implementation of relationship and other information. Because the query taking into account the inheritance, so it needs proper information modeling, for the memory of a recursive search.

       Specific architecture is shown:

 

2. The second job

  The job complete query UML sequence diagram and state diagram is detected three rules.

  The difficulty lies in the query and modeling three rules of two new graphs.

        First, to check the validity according to the first operation on the basis of a new class, consider using discrete modeling later circulated inherited queries. The rest of the job for the first time with the idea, modeled from the top down.

        Specific architecture is shown:

 

 

II. Evolution of four cell architecture and method is understood OO

The first unit: polynomial derivation

It now appears that the first job is simple, but the level of understanding of basic grammar is quite difficult for me at that time only to reach, mainly lies in data exchange and hierarchical design between classes. But first I have to use a secondary job Taisho determine the format for error, and no combination of various polynomial operation spread, leading to the completion of the third job very difficult. But after the completion of the third job after finding a job in the hierarchy, the basic structure has a higher increase, the code reusability are slowly getting better.

Second unit: Elevator

The second unit is very unique also play a very high ceiling unit. The basic architecture is the work of three input stream, the scheduler, elevator three threads together, the three mutually exclusive synchronization is important and difficult. And shared input stream queue scheduler, and the scheduler, and the respective elevators share a new instruction to be executed a second portion of the queue and the queue of a single embodiment. Correctness relatively easy to accomplish, but optimized with some difficulty.

Upon completion of the elevator unit, with a certain degree of understanding for mutual exclusion synchronization data sharing between various objects, deepening of the interaction between objects, dependent on understanding and further enhance the level of their own hierarchical design.

III: normalized Design

第三单元我觉得是比较简单的一个单元,原因有二:官方包的提供极大简化了我们的代码设计;之前的训练让自己有了一定的提升。在读懂JML规格后,要做的事情就是:传入数据,离散化建模,统一算法。算法主要使用的是floyd算法,简单高效。层次主要就是path图和path内的节点列的管理。

这个单元的三次作业的代码复用性都明显比前两个单元的好很多,我认为这就是规格化设计的能力和魅力,严谨明确,让自己提前和规范设计的能力有了一定的提升。

前两个单元自己并没有多次使用继承和多态的特点,而这个单元的训练,对OO独特的继承、多态的方法有了更深层次的理解。

第四单元:UML解析

UML类图、顺序图、状态图主要是为了锻炼我们工程化设计的能力,这个单元主要在于对UML各个元素内部要素的理解以及对元素之间层次化的树的关系的理解。理解完成后,就要综合前三单元学到的知识,来对元素分类、层次化设计、设计适当的查询算法。完成这个单元的过程中,我对层次化的设计、对象之间的交互、共享数据的保护、各个类和各个方法的分工等工作的完成流畅度和明显好于前三个单元,可见经过前面三个单元的训练,不知不觉地我们在OO道路上已经前进了不少。

三.四个单元中测试理解与实践的演进

测试的目的一直都是来确认程序的正确性和性能优劣。

我一个学期以来都采用了比较low的测试方法:手动捏数据。根据自己在代码过程中的bug数据,自己总结的一些极端情况的数据以及室友提供的部分大测试数据,来进行自测和互测。

尽管一直都是手搓数据点,但是从第一二单元bug重重到第三四单元bug较少的情况来看,一是随着训练的推进自己的代码水平有了一定提升,二是测试数据的构造思路有了一定的改善,能更快的发现哪里容易有坑,也能较快地对之进行修复。

四.课程收获

自动化测试主要是用于代码的覆盖测试和高效测试,虽然我自己实践不足,所以只有在代码思路设计方面多下功夫。几乎每一次作业我都会在动手写代码之前写一份简要的思路设计,这样做的好处我觉得主要是有:方便自己将一个大问题分成若干小问题,逐个解决;从设计上就杜绝了大部分可能会出现的bug。随着训练的推进,我发现这种方法越来越好用,并且代码时间越来越短,bug出现的概率越来越小,同时也能加深对面向对象方法的理解,提升代码的设计能力。

四个单元,11次代码作业,这一路走来跌跌撞撞,但是也学到了很多很多东西:无论是从面向过程到面向对象,还是从一main到底到多个类的层次化设计,亦或是从艰难几十行到顺利完成千行工程代码,从OO这门课程学到的知识是良多的,但更重要的是在这修罗道路上前进的同时,自己变得更加坚强了。

五.一些建议

1.第一单元建议先来一次较为简单的JML规格作业,能够快速地帮助我们理解层次化设计和OO特点。

2.我认为互测是OO这门课的一大特色以及在助教的努力下,其进步是明显的。但是实际上,我们对互测的热情从第一单元到第三单元是递减的(可能数据体现不出来),或者说几乎没有看别人代码,而是盲狙或者自动化测试,似乎与互测的目的背道而驰,或许互测机制需要更好地完善。

3.说实话,实验课的体验很不好,主要是上完新课下午就去实验,一开始难度太大,后来是现场自学,希望实验课降低分数比例或者改进实验课。

Guess you like

Origin www.cnblogs.com/qmxdzy/p/11074931.html