Southern Federal University Faculty of mathematics, mechanics and computer science Milchakova str. 8a, Rostov-on-Don, 344090 Phone.: (863) 2975 111; Fax: (863) 2975 113; SYLLABUS 1-semester course Object-oriented design and programming in C++ for Masters Program Computational Mechanics and Biomechanics. 4 ECTS Credits Aim of the course The main aim of the course of object-oriented design and programming in C++ is to bring together mathematical modeling and modern programming methodology. Mathematical modeling and computational experiment are basic techniques in mechanics and biomechanics research but software is a main tool of those techniques. So, the course is dedicated to the overview of OOD & OOP paradigm, its' methodology and its' applications in the field of software design for computer-based numerical analysis for natural science problems. The subject of the course is focused on the ideas of the objectoriented programming vs. procedure-oriented programming and on the new vision of the several numerical methods and techniques as an implementation of a set of specific data types than represent the language of a problem field. While the major emphasis is on the study of fundamental concepts of OOP: abstraction, encapsulation, modularity and data 2 hierarchy through inheritance, the course also attempts to draw attention to polymorphism and typing, parallelism, stability and other significant concepts and features of OOP methodology. Also this course deals with methods, techniques; tricks and receipts for practical programming and program coding in C++. Techniques, Skills, etc. After completing the course, the students are expected to be able to: compare the programming languages and their facilities for object-oriented programming; define a set of abstract concepts as a knowledge domain environment; design a hierarchical set of data types (classes) on the base of inheritance; make out the classes hierarchy on the base of inclusion relations and on the base of private inheritance; choose and implement a suitable inheritance scheme: behavior and realization; only realization; only behavior; understand and utilize dynamic dispatch (dynamic binding or late binding or run-time linking) and static calls (fixed implementation or name binding or early binding or compilation-time linking) and utilize both in computer program code; understand the role of polymorphism and design polymorphic computer program code; present coherent arguments to answer questions both orally and in writing. Teaching The following methods and forms of study are used in the course: Lectures Labs Problem sets Program coding 3 Self-study Use of different reference books and Internet resources At the end of the course the students are supposed to do problem sets and write a report, make an oral presentation and participate in discussion. Upon the successful completion, the students will gain 4 credits. Course content # Subject № 1. 1 1Introduction. Form of Duration Lesson (hrs) Lecture 1 Lecture 1 Lecture 1 Course organization, its aims and structure. Information on core and additional readings. 2. 2 2Role of programming methodology, programming technology and programming languages facilities. Comparison the concepts of procedure-oriented programming (POP) and object-oriented programming (OOP) 3. 3 Fundamental concepts of objectoriented programming Date 4 (OOP): abstraction, encapsulation, modularity, data hierarchy through inheritance, polymorphism and typing, parallelism and stability 4. 4 Classes in C++. Encapsulation and Lecture 1 Self-study 1 Lecture 2 Laboratory, 2 Self-study 4 modularity – methods and properties in classes. Example – class "String" 5. 5 5Polymorphism in C++. Five ways to implement polymorphic code. The functions overloading and default values for functions' parameters in C++ 6. 6 6Interface as a data type definition. Operators overloading in C++. Class methods and class friends in C++. Inline functions. 7. Concept of lvalue in Lecture C++. Pointer and 7 reference data types in C++. Constants in C++: objects, pointers, references, methods. Techniques; tricks and 4 5 receipts for practical programming and program coding in C++ with pointers, references and constants 8. 8 Concept of encapsulation and its Lecture 8 Self-study 2 Laboratory, 4 Self-study 6 implementation in C++. Default rules vs. encapsulation in C++. Initialization and assignment for objects. Constructors and destructor in C++ classes environmental. 9. Type conversion (type coercion and type 9 casting) rules in C++. How to control typecasting by constructors and typecasting operation. Typecasting for variables, pointers and references. 10. 10 Static properties and Lecture methods in C++ classes. Techniques; tricks and receipts for practical programming and program coding in C++ with static 2 6 properties and methods. 11. 11 Heap-based Laboratory, (dynamic) memory control Self-study, 5 8 in C++ classes. Techniques; tricks and receipts for practical programming and program coding in C++ with heapbased memory control. 12. 12 Classes' hierarchy: inclusion relations and Lecture 2 Self-study 2 Lecture 2 Self-study 2 Lecture 2 Self-study 2 Lecture 4 Self-study 2 inheritance. 13. 13 Inheritance implementation for polymorphism and for strong typing. Dynamic (late) binding and name (early) binding. 14. I/O tools in C and C++. Standard I/O 14 functions C-library vs. Standard I/O streams C++ class library. 15. Three inheritance schemes: for behavior and 15 realization; only for realization; only for behavior. Abstract classes and abstract base classes in C++. 7 16. 16 1Multiple Laboratory, 6 inheritances in C++. Self-study 8 Lecture 2 Self-study 4 Lecture 2 Self-study 8 Virtual inheritance and virtual base classes. Techniques; tricks and receipts for practical programming and program coding in C++ with multiple inheritances. 17. Exception handling system in C++. 17 Techniques; tricks and receipts for practical programming and program coding in C++ with exception handling implementation. 18. 18 Concept of generic programming. Parameterized functions and parameterized types. Templates in C++, standard template library (STL). Techniques; tricks and receipts for practical programming and program coding in C++ with STL. 19. Summarizing ` presentation 19 Colloquium 8 Requirements During the session students are required to attend class lectures; be prepared to laboratory hours; attend the laboratory; write a report; represent the report results in oral presentation at the colloquium; be prepared to participate in final course discussion. Grade determination Class participation - 30% Laboratory work - 40% Written report and its presentation – 20% Participation in discussion – 10% Literature Core Booch, Grady (1997). Object-Oriented Analysis and Design with Applications. Addison-Wesley. ISBN 0-8053-5340-2. Stroustrup, Bjarne (1997). The C++ Programming Language (Third ed.). ISBN 0201889544 Sutter, Herb (2004). Exceptional C++ Style. Addison-Wesley. ISBN 0-201-760428. Vandevoorde, David; Nicolai M. Josuttis (2003). C++ Templates: The complete Guide. Addison-Wesley. ISBN 0-201-73484-2. Becker, Pete (2006). The C++ Standard Library Extensions: A Tutorial and Reference. Addison-Wesley. ISBN 0-321-41299-0. 9 Additional Meyer, Bertrand (1997). Object-Oriented Software Construction. Prentice Hall. ISBN 0-13-629155-4. Rumbaugh, James; Michael Blaha, William Premerlani, Frederick Eddy, William Lorensen (1991). Object-Oriented Modeling and Design. Prentice Hall. ISBN 0-13629841-9. Alexandrescu, Andrei; Herb Sutter (2004). C++ Design and Coding Standards: Rules and Guidelines for Writing Programs. Addison-Wesley. ISBN 0-321-11358-6. Schreiner, Axel-Tobias (1993). Object oriented programming with ANSI-C. Hanser. ISBN 3-446-17426-5. http://hdl.handle.net/1850/8544. Internet Resources Object-oriented programming at the Open Directory Project. http://www.dmoz.org/Computers/Programming/Methodologies/Object-Oriented/ JTC1/SC22/WG21 - The ISO/IEC C++ Standard Working Group. http://www.openstd.org/jtc1/sc22/wg21/ An incomplete list of C++ compilers, maintained by C++'s inventor: Bjarne Stroustrup http://www2.research.att.com/~bs/compilers.html Boost C++ source library http://www.boost.org/