tailieunhanh - CRC.Press A Guide to MATLAB Object Oriented Programming May.2007 Episode 2 Part 6

Tham khảo tài liệu ' a guide to matlab object oriented programming episode 2 part 6', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 274 A Guide to MATLAB Object-Oriented Programming 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 2 3 disp 2 3 star star Size 2x1 double ColorRgb 3x1 double Points 2x6 double LineWeight normal Title A Star is born fieldnames star ans Size ColorRgb Points LineWeight Title fieldnames star -full ans ans Size double array 2x1 ColorRgb double array 3x1 Points double array 2xN LineWeight normal bold Title string fieldnames star -possible ans Size 1x1 cell ColorRgb 1x1 cell Points 1x1 cell LineWeight 1x1 cell Title 1x1 cell struct star Size 2x1 double ColorRgb 3x1 double Points 2x6 double LineWeight normal Title A Star is born star cStar cStar cStar cStar size star ans 2 2 Class Wizard Versions of the Shape Hierarchy 275 65 66 ans 67 1 1 1 1 68 1 1 1 1 69 70 ans 71 2x1 double 2x1 double 2x1 double 2x1 double 72 73 disp class star 74 cStar 75 disp isa star cShape 76 1 77 disp isa star cDiamond 78 0 Attending to the myriad details is something that a CASE tool can do very well. Even this is difficult unless there is a good organizational structure. The organizational structure advocated by the preceding chapters results in good class implementation and Class Wizard is very helpful in maintaining that structure. This is particularly true when the class definition evolves. With Class Wizard evolution is a simple matter of adding elements to the definition and rebuilding the files. Files managed by the tool are overwritten with the new definition while handcrafted files are untouched. The best balance is always maintained between standard idioms and a developer s creativity. INDEPENDENT INVESTIGATIONS 1. Repeat the test-drive commands using cDiamond objects instead of cShape objects. 2. Modify the class interfaces to allow shapes to be rotated by an arbitrary angle. Use Class Wizard to generate the initial versions of helper functions and .

TỪ KHÓA LIÊN QUAN