100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Lecture notes

Object Oriented Programming in C++ Notes

Rating
-
Sold
-
Pages
615
Uploaded on
28-11-2025
Written in
2024/2025

These Notes are comprehensive set of lecture notes for the Object-Oriented Programming (OOP) in c++ CS1004 course. It covers fundamental to intermediate C++ programming concepts in a structured, lecture-based format. The material includes explanations, diagrams, code examples, and class activities for practice. The notes begin with the basics of C++ programming, including syntax, structure of a program, compilation phases, data types, I/O operations, and simple programs. It then progresses into control structures such as if/else, switch, loops (while, do-while, for), nested loops, and logic flow. Later sections provide an in-depth understanding of arrays (1D and 2D), their memory representation, initialization, array processing, bounds issues, and various examples involving searching, averaging, matrix operations, and array manipulation. A large portion of the document focuses on pointers in C++, explaining pointer declarations, referencing / dereferencing, pointer arithmetic, pointer–array relationships, pointer to arrays, and memory layout of multidimensional arrays. The final section introduces dynamic memory allocation (DMA) using new and delete, handling dynamically created 1D and 2D arrays, dangling pointers, memory leaks, and resizing arrays manually at runtime. Overall, the document serves as a detailed and beginner-friendly guide to essential C++ programming concepts, with many examples and class activities to reinforce learning

Show more Read less
Institution
Module











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Module

Document information

Uploaded on
November 28, 2025
Number of pages
615
Written in
2024/2025
Type
Lecture notes
Professor(s)
Atiq ur rehman
Contains
All classes

Subjects

Content preview

Object Oriented Programming
Introduction

Lecture 1
Spring 2025



CS1004 - Spring 2025 1

,Lecture Contents
• C++ Programming basics
• Control structures
• Arrays




CS1004 - Spring 2025 2

, Programming Style
• C++ is a free-format language, which means that:
• Extra blanks (spaces) or tabs before or after identifiers/operators are ignored

• Blank lines are ignored by the compiler just like comments

• Code can be indented in any way

• There can be more than one statement on a single line

• A single statement can continue over several lines




CS1004 - Spring 2025 3

, Programming Style (cont. )
• In order to improve the readability of your program, use the following conventions:
• Start the program with a header that tells what the program does

• Use meaningful variable names and Camel notation

• Document each variable declaration with a comment telling what the variable is used for

• Place each executable statement on a single line

• A segment of code is a sequence of executable statements that belong together
• Use blank lines to separate different segments of code

• Document each segment of code with a comment telling what the segment does.




4
CS1004 - Spring 2025
£6.56
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
atiqd

Get to know the seller

Seller avatar
atiqd National University of Computer and Emerging Sciences (FAST)
Follow You need to be logged in order to follow users or courses
Sold
New on Stuvia
Member since
1 week
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions