Babes-Bolyai University of Cluj-Napoca
Faculty of Mathematics and Computer Science
Study Cycle: Graduate

SUBJECT

Code
Subject
MID0002 Object-Oriented Programming
Section
Semester
Hours: C+S+L
Category
Type
Mathematics
2
2+0+2
fundamental
compulsory
Computer Science
2
2+2+2
fundamental
compulsory
Mathematics and Computer Science
2
2+0+2
fundamental
compulsory
Applied Mathematics
2
2+0+2
fundamental
compulsory
Teaching Staff in Charge
Assoc.Prof. NICULESCU Virginia, Ph.D.,  vniculescucs.ubbcluj.ro
Lect. PREJMEREAN Vasile, Ph.D.,  percs.ubbcluj.ro
Lect. DARVAY Zsolt, Ph.D.,  darvaycs.ubbcluj.ro
Lect. TRÎMBITAS Gabriela, Ph.D.,  gabitrcs.ubbcluj.ro
Aims
On completion of the class, a student should be able:
* to prepare an object-oriented design of small/medium scale problems
* to demonstrate the differences between traditional imperative design and object-oriented design
* to explain class structures as fundamental, modular building blocks
* to understand the role of inheritance, polymorphism, dynamic binding and generic structures in building reusable code
* to explain and to use defensive programming strategies, employing formal assertions and exception handling
* to write small/medium scale C++ programs
* to use classes written by other programmers when constructing their systems
* to understand and to use fundamental data structures: collections, sets, dictionaries, lists, stacks, queues, trees, graphs.
Content
1. Basic elements of C++ language.
- Lexical elements. Operators. Conversions.
- Data types. Variables. Constants.
- Visibility scope and lifetime of the variables.
- Namespaces.
2. Statements and functions in C++.
- C++ Statements.
- Function declaration and definition.
- Function overloading.
- Inline function.
3. Derived data types and user data types, dynamic allocation in C++.
- Data types: array and struct.
- Data types: pointer and reference.
- Memory allocation and deallocation.
- Pointers to functions and pointers void.
4. Modular programming in C++.
- Header files. Libraries.
- Modular implementations of ADTS.
- Using the void pointer to achieve genericity.
5. Object oriented in C++.
- Classes and objects.
- Members of a class. Access modifiers.
- Constructors / destructors
- UML diagrams for classes (members, accessibility).
- Association and aggregation relations between
classes -UML representation;
6. Operators' overloading. Static members. Friends.
- Class Linked_List. Iterator on list.
7. Inheritance
- Simple inheritance. Derived classes.
- Substitution principle.
- Method overriding.
- Multiple inheritance.
- Specialization/generalization relation - UML representation.
8. Polymorphism.
- Virtual methods.
- Dynamic binding.
- Virtual inheritance.
- Code reusing (inheritance/composition).
- Conversions (upcast/downcast).
9. Object oriented design and interface based design.
- Abstract classes, interfaces.
- UML representation for interfaces.
- Object oriented design of a library of the basic data structures
10. Input/output operation. (C10+S10)
- I/O streams. I/O Hierarchies of classes.
- Format. Manipulators.
- Files.
11. Templates.
- Template functions. Template classes.
- Source-code reusing.
12. STL library
- Container classes and iterators.
- STL algorithms.
13. Exception handling.
- Notion of exception in programming.
- Exception handling. in C++.
14. Visual C++ environment.
- User Interface Components.
- Events.

References
1. A.V. Aho, J.E. Hopcroft, J.D. Ullman, Data Structures and Algorithms, Addisson-Wessley Publ., Massachusetts, 1983.
2. R. Andonie, I. Garbacea, Algoritmi fundamentali. O perspectiva C++, Editura Libris,
3. Alexandrescu, Programarea modernă in C++. Programare generică si modele de proiectare aplicate, Editura Teora, 2002
4. M. Frentiu, B. Parv, Elaborarea programelor. Metode si tehnici moderne, Ed. Promedia, Cluj-Napoca, 1994.
5. E. Horowitz, S. Sahni, D. Mehta, Fundamentals of Data Structures in C++, Computer Science Press, Oxford, 1995.
6. K.A. Lambert, D.W. Nance, T.L. Naps, Introduction to Computer Science with C++, West Publishing Co., New-York, 1996.
7. L. Negrescu, Limbajul C++, Ed. Albastra,Cluj-Napoca 1996.
Cluj_Napoca, 1995.
8. Dan Roman, Ingineria programarii obiectuale, Editura Albastra, Cluj_Napoca, 1996.
9. B. Stroustup, The C++ Programming Language, Addison Wesley, 1998.
Assessment
Final grade is obtained based on:
A. Laboratory activity N1: 20%
B. Seminar activity N2: 10%
C. Written exam N3: 50%
D. Practical exam N4: 20%
The written exam and the practical exam are sustained during the exams' session.
Links: Syllabus for all subjects
Romanian version for this subject
Rtf format for this subject