Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class 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
Course

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

Written for

Course

Document information

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

Subjects

$8.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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
-
Member since
5 months
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 tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right 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 aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions