About the subject
What Object Oriented Programming is for
Computer Programming taught how to make a computer follow steps. This course teaches how to organise a large program so that it stays understandable: grouping data with the functions that act on it, reusing code through inheritance, and letting one interface work with many types through virtual functions and templates.
The ideas carry directly into Java, Python, C# and every modern framework, so the effort spent here pays back in every later software course. By subtopic count it is the most detailed syllabus in the whole Computer and BEI first year.
To provide students with foundation in understanding and applying principles of object oriented programming. Emphasis will be given on developing object oriented programming skills using C ++.
IOE's course objective for ENCT 151
- Taught to
- BCT, Semester 2 (Year I, Part II) and BEI, Semester 2 (Year I, Part II)
- Weekly
- 3 lecture, 1 tutorial, 3 practical hours
- Marks
- Theory 40 internal + 60 final (3-hour exam); practical 50 internal; 150 in total
Where the marks are
ENCT 151 chapters, hours and final exam marks
IOE's evaluation scheme for the 60-mark final. IOE notes there may be minor deviation.
Scroll the table sideways for hours, marks and share.
Full syllabus
The complete ENCT 151 outline, with how to study each chapter
All 9 chapters and 93 topics as IOE lists them, each with ICE's advice on approaching it.
1Introduction to Object Oriented Programming3 hours
Why object orientation exists and how it differs from procedure oriented programming. Worth understanding before any C++ syntax.
- 1.1 History of programming languages
- 1.2 Need of object oriented programming(OOP)
- 1.3 Object oriented programming versus procedure oriented programming
- 1.4 Concepts of object oriented programming
- 1.5 Popular object oriented languages
- 1.6 Advantages of OOP
- 1.7 Disadvantages of OOP
2Basics of C++ Programming5 hours
C++ basics that differ from C: references, namespaces, const, enumerations and dynamic memory with new and delete.
- 2.1 C++ Program structure
- 2.2 Character set and tokens
- 2.3 Variable declaration and expression
- 2.4 Data types
- 2.5 Type conversion and casting
- 2.6 User defined constant const
- 2.7 Reference variables
- 2.8 Conditions and looping
- 2.9 Namespace scope
- 2.10 Functions
- Function overloading
- Inline function
- Default arguments
- Pass by reference and return by reference
- 2.11 Array, pointer and string
- 2.12 Structure and unions
- 2.13 Enumeration
- 2.14 Dynamic memory allocation
3Objects and Classes7 hours
Objects and classes, the largest chapter with 17 subtopics and 9 of 60 marks. Constructors, destructors, static members and friend functions all appear in exam questions; write a small class for each.
- 3.1 C++ classes
- 3.2 Objects and the member access
- 3.3 Relation of object, class and memory
- 3.4 Defining member function
- 3.5 Defining outer function inline
- 3.6 Objects as member
- 3.7 Constructors and destructors
- 3.8 Object as function arguments
- 3.9 Returning objects from functions
- 3.10 Array of objects
- 3.11 Pointer to objects
- 3.12 Dynamic memory allocation for objects
- 3.13 Dynamic constructors
- 3.14 Pointer
- 3.15 Static data member and static member function
- 3.16 Constant member functions and constant objects
- 3.17 Friend functions and friend classes
4Operator Overloading5 hours
Operator overloading as member and non-member functions, and conversion between objects. Overload the arithmetic and stream operators for a class like a complex number or a fraction.
- 4.1 Overloadable and non- overloadable operators
- 4.2 Syntax of operator overloading
- 4.3 Operator overloading using member operator functions
- 4.4 Operator overloading using non member functions
- 4.5 Unary operator overloading
- 4.6 Binary operator overloading
- 4.7 Type conversion between objects
- 4.8 Explicit constructors
5Inheritance5 hours
Inheritance: access specifiers, forms of inheritance, constructors in derived classes and virtual base classes. Draw the class hierarchy for every example.
- 5.1 Base class and derived class
- 5.2 protected access specifier
- 5.3 Derived class declaration
- 5.4 Is_a relation and Has_a relation
- 5.5 Public, protected and private inheritance
- 5.6 Member overriding
- 5.7 Forms of inheritance
- 5.8 Constructors in derived class
- 5.9 Destructor in derived class
- 5.10 Need of virtual base class
6Virtual Functions4 hours
Virtual functions, abstract classes and run-time type information. This is where polymorphism finally makes sense; trace which function runs through a base class pointer.
- 6.1 What is virtual function
- 6.2 Need of virtual function
- 6.3 Pointer to derived class
- 6.4 Array of pointers to base class
- 6.5 Pure virtual functions and abstract class
- 6.6 Virtual destructors
- 6.7 Reinterpret cast operator
- 6.8 Run-time type information
7Stream Computation6 hours
Streams and files: formatted input and output, stream errors, and sequential and random file access.
- 7.1 Input/output stream class hierarchy
- 7.2 Testing stream errors
- 7.3 Unformatted input/output and formatted input/output
- 7.4 Stream operator overloading
- 7.5 File input/output with streams
- 7.6 File stream class hierarchy
- 7.7 ASCII and binary files
- 7.8 Read/Write from file
- 7.9 Sequential access to file
- 7.10 Random access to file
- 7.11 File access pointers and their manipulators
- 7.12 Testing errors during file operations
- 7.13 File input/output with member functions
8Templates6 hours
Function and class templates and an introduction to the Standard Template Library. Using vector and map in your own programs is the best way to learn them.
- 8.1 Function template
- 8.2 Overloading function template
- 8.3 Class template
- 8.4 Derived class template
- 8.5 Introduction to standard template library
- Components of STL
- Container
- Iterators
- Algorithms
9Exception Handling4 hours
Exception handling with try, throw and catch, including exceptions in constructors and destructors.
- 9.1 Basics of exception handling
- 9.2 Advantage over conventional error handling
- 9.3 Exception handling mechanism
- 9.4 Multiple handlers
- 9.5 Catching all exceptions
- 9.6 Rethrowing exception
- 9.7 Exception with arguments
- 9.8 Exceptions specification for function
- 9.9 Exceptions in constructors and destructors
- 9.10 Handling uncaught exceptions
- 9.11 Handling unexpected exception
Tutorials
Practising Object Oriented Programming
The practical is assessed internally, and IOE describes it as laboratory exercises on the topics of the course rather than listing them one by one. Write every example yourself: object oriented design only becomes clear once you have built and broken a few class hierarchies.
Before and after
How Object Oriented Programming connects to other courses
Builds on
Leads to
Data structures, computer graphics, web application programming and software engineering all assume object oriented design.
Reference books
Books IOE lists for ENCT 151
- Schildt, H. (2015). C++: The Complete Reference. McGraw-Hill Education.
- Baral, D.S., Baral, D. (2010). Secrets of Object Oriented Programming in C++. Bhundipuran Prakasan.
- Lafore, R. (2002). Object Oriented Programming in C++. Sams Publishing.
- Deitel, H.M., Deitel, P.J. (2007). C++ How to Program. Prentice Hall.
Quick answers
Object Oriented Programming questions
Which language is used in IOE Object Oriented Programming?
C++. ENCT 151 covers C++ classes, overloading, inheritance, virtual functions, streams, templates and exception handling.
Is Object Oriented Programming in the Civil Engineering syllabus?
No. ENCT 151 is taught to Computer and BEI students in Semester 2. Civil students study Computer Programming in C in Semester 1.
Which OOP chapter carries the most marks?
Objects and Classes, with 9 of the 60 final marks, followed by Stream Computation and Templates with 8 each.
How many credits and marks is ENCT 151 Object Oriented Programming?
3 credits and 150 marks: 40 internal and 60 in a 3-hour IOE final for theory, plus 50 marks of practical assessed internally. It is taught 3 lecture, 1 tutorial and 3 practical hours a week.
Source
Checked against IOE
The outline, references and marks are IOE's own, from the ENCT 151 syllabus PDF and IOE's curriculum structure. The study advice is ICE's. If IOE revises the course, its syllabus is what counts. IOE's BCT curriculum page.