{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

C8-Object-Oriented Thinking - K thut lp trnh Chng 8 Tin ti...

Info icon This preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
K thu t l p trình 0101010101010101100001 0101010101010101100001 0101010101010101100001 0101010100101010100101 0101010100101010100101 0101010100101010100101 1010011000110010010010 1010011000110010010010 1010011000110010010010 1100101100100010000010 1100101100100010000010 1100101100100010000010 0101010101010101100001 0101010101010101100001 0101010101010101100001 0101010100101010100101 0101010100101010100101 0101010100101010100101 1010011000110010010010 1010011000110010010010 1010011000110010010010 1100101100100010000010 1100101100100010000010 1100101100100010000010 0101010101010101100001 0101010101010101100001 0101010101010101100001 0101010100101010100101 0101010100101010100101 0101010100101010100101 1010011000110010010010 1010011000110010010010 1010011000110010010010 1100101100100010000010 1100101100100010000010 1100101100100010000010 8/13/2007 y = A*x + B*u; x = C*x + d*u; StateController start() stop() LQGController start() stop() Ch ươ ng 8: Ti ế n t i t ư duy l p trình h ướ ng ₫ố i t ượ ng
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Ch ươ ng 8: Ti ế n t i t ư duy h ướ ng đố i t ượ ng N i dung ch ươ ng 8 8.1 Đặ t v n ₫ề 8.2 Gi i thi u ví d ch ươ ng trình mô ph ng 8.3 T ư duy "r t" c ổ ₫ i n 8.4 T ư duy h ướ ng hàm 8.5 T ư duy d a trên ₫ố i t ượ ng (object-based) 8.6 T ư duy th c s h ướ ng ₫ố i t ượ ng
Image of page 2
3 Ch ươ ng 8: Ti ế n t i t ư duy h ướ ng đố i t ượ ng 8.1 Đặ t v n ₫ề „Designing object-oriented software is hard, and designing reusable object-oriented software is even harder...It takes a long time for novices to learn what object-oriented design is all about. Exprienced designers evidently know something inexperienced ones don't... One thing expert designers know not to do is solve every problem from first principles. Rather, they reuse solutions that have worked for them in the past. When they find a good solution, they use it again and again. Such experience is part of what makes them experts. Consequently, you'll find recurring patterns of classes and communicating objects in many object-oriented systems. These patterns solve specific design problems and make object-oriented design more flexible, elegant, and ultimately reusable...“ Erich Gamma et. al.: Design Patterns: Elements of Reusable Object- Oriented Software , Addison-Wesley, 1995.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Ch ươ ng 8: Ti ế n t i t ư duy h ướ ng đố i t ượ ng 8.2 Ph n m m mô ph ng ki u FBD StaticGain Limiter Integrator Sum Scope 1(t) Nhi m v : Xây d ng ph n m m ₫ể h tr mô ph ng th i gian th c m t cách linh ho t, m m d o, áp ng ₫ượ c các yêu c u c a t ng bài toán c th Tr ướ c m t ch ư a c n h tr t o ng d ng ki u kéo th b ng công c ụ ₫ồ h a
Image of page 4
5 Ch ươ ng 8: Ti ế n t i t ư duy h ướ ng đố i t ượ ng 8.3 T ư duy r t c ổ ₫ i n // SimProg1.cpp #include <iostream.h> #include <conio.h> #include <windows.h> void main() { double K =1,I=0, Ti = 5; double Hi = 10, Lo = -10; double Ts = 0.5; double r =1, y=0, e, u, ub; cout << "u\ty"; while (!kbhit()) { e = r-y; // Sum block u = K*e; // Static Gain ub = max(min(u,Hi),Lo); // Limiter I += ub*Ts/Ti; // Integrator state y = I; // Integrator output cout << '\n' << u << '\t' << y; cout.flush(); Sleep(long(Ts*1000)); } }
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern