This document outlines the course objectives and structure for CS-200 Object Oriented Programming taught by Muhammad Usman. The course will introduce students to object-oriented programming concepts in C++, including applying features to program design and implementation. Students will learn about classes, objects, inheritance and design patterns. The document provides information on textbooks, tools, assignments, exams and contact details for the instructor.
This slide notes are more than 10 years old of my teacher Mr Karim Zebari. He uses a brilliant simple language to explain programming principles step by step.
This slide notes are more than 10 years old of my teacher Mr Karim Zebari. He uses a brilliant simple language to explain programming principles step by step.
cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...bhargavi804095
C++ is the top choice of many programmers for creating powerful and scalable applications. From operating systems to video games, C++ is the proven language for delivering high-performance solutions across a range of industries.
One of the standout features of C++ is its built-in support of streams. C++ makes it easy to channel data in and out of your programs like a pro. Whether you’re pushing data out to cout or pulling it in from cin, C++ streams are the key to keeping your code in the zone.
Excellence Academy Is The Renowned & Best Python Training Institute In Chandigarh That Provides 100% Job-Oriented .Python Training Institute In Mohali Our Course Is Designed Especially For Students, Housewives & Other Who Are Looking For Python Training In Chandigarh.
Excellence Academy Is The Renowned & Best Python Training Institute In Chandigarh That Provides 100% Job-Oriented .Python Training Institute In Mohali Our Course Is Designed Especially For Students, Housewives & Other Who Are Looking For Python Training In Chandigarh.
#Code2Create series: C++ is a powerful general-purpose programming language. It can be used to develop operating systems, browsers, games, and so on. C++ supports different ways of programming like procedural, object-oriented, functional, and so on.Start your programming journey and join us to learn C++ basics!
by Google Developers Group and Women Tech-markers Kuwait chapter:
Instagram and Twitter: @GDGWTMKUWAIT
A C++ program //include headers; these are modules that include functions that you may use in your //program; we will almost always need to include the header that // defines cin and cout; the header is called iostream.h #include <iostream.h>
int main() {
//variable declaration //read values input from user //computation and print output to user return 0; }
After you write a C++ program you compile it; that is, you run a program called compiler that checks whether the program follows the C++ syntax – if it finds errors, it lists them – If there are no errors, it translates the C++ program into a program in machine language which you can execute.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
More Related Content
Similar to Lecture # 1 - Introduction Revision - 1 OOPS.pptx
cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...bhargavi804095
C++ is the top choice of many programmers for creating powerful and scalable applications. From operating systems to video games, C++ is the proven language for delivering high-performance solutions across a range of industries.
One of the standout features of C++ is its built-in support of streams. C++ makes it easy to channel data in and out of your programs like a pro. Whether you’re pushing data out to cout or pulling it in from cin, C++ streams are the key to keeping your code in the zone.
Excellence Academy Is The Renowned & Best Python Training Institute In Chandigarh That Provides 100% Job-Oriented .Python Training Institute In Mohali Our Course Is Designed Especially For Students, Housewives & Other Who Are Looking For Python Training In Chandigarh.
Excellence Academy Is The Renowned & Best Python Training Institute In Chandigarh That Provides 100% Job-Oriented .Python Training Institute In Mohali Our Course Is Designed Especially For Students, Housewives & Other Who Are Looking For Python Training In Chandigarh.
#Code2Create series: C++ is a powerful general-purpose programming language. It can be used to develop operating systems, browsers, games, and so on. C++ supports different ways of programming like procedural, object-oriented, functional, and so on.Start your programming journey and join us to learn C++ basics!
by Google Developers Group and Women Tech-markers Kuwait chapter:
Instagram and Twitter: @GDGWTMKUWAIT
A C++ program //include headers; these are modules that include functions that you may use in your //program; we will almost always need to include the header that // defines cin and cout; the header is called iostream.h #include <iostream.h>
int main() {
//variable declaration //read values input from user //computation and print output to user return 0; }
After you write a C++ program you compile it; that is, you run a program called compiler that checks whether the program follows the C++ syntax – if it finds errors, it lists them – If there are no errors, it translates the C++ program into a program in machine language which you can execute.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfJay Das
With the advent of artificial intelligence or AI tools, project management processes are undergoing a transformative shift. By using tools like ChatGPT, and Bard organizations can empower their leaders and managers to plan, execute, and monitor projects more effectively.
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
2. Course Objectives
Understand object-oriented programming features in C++
Apply these features to program design and implementation
Understand object-oriented concepts and how they are supported by
C++
Gain some practical experience of C++
Understand implementation issues related to object-oriented techniques
Build good quality software using object-oriented techniques
Understand the role of patterns in object-oriented design.
3. Textbook and Tools
Textbook
Object-Oriented Programming in C++
4th Ed., Robert Lafore; SAMS Publishing
C++ How to Programming
9th Edition by Deitel & Deitel
Programming Tools
Dev C++
Microsoft Visual Studio
4. Mid-Term Examination 30% 30 Marks
Assignments &
Quizzes
20%
20 Marks
4 Quizzes (10 Marks)
(2 Quiz before Mid & 2 Quiz After Mid)
4 Assignments (10 Marks)
(2 Assignments before Mid & 2 Assignments After Mid)
Final Examination 50% (25 % of Mid-Term Must Include) 50 Marks
Class Evaluation and Contact
Contact
Class Representative(s)
mhmdusmaan@gmail.com / muhammad.usman@abasynisb.edu.pk
5. Introduction to C++
C++ Origins
Low-level languages
Machine, assembly
High-level languages
C, C++, ADA, COBOL, FORTRAN
Object-Oriented-Programming in C++
C++ Terminology
Programs and functions
Basic Input/Output (I/O) with cin and cout
8. Constants
Naming your constants
Literal constants are "OK", but provide
little meaning
e.g., seeing 24 in a pgm, tells nothing about
what it represents
Use named constants instead
Meaningful name to represent data
const int NUMBER_OF_STUDENTS = 24;
Called a "declared constant" or "named constant"
Now use it’s name wherever needed in program
Added benefit: changes to value result in one fix
11. C++ Variables
C++ Identifiers
Keywords/reserved words vs. Identifiers
Case-sensitivity and validity of identifiers
Meaningful names!
Variables
A memory location to store data for a program
Must declare all data before use in program
14. Assigning Data
Initializing data in declaration statement
Results "undefined" if you don’t!
int myValue = 0;
Assigning data during execution
Lvalues (left-side) & Rvalues (right-side)
Lvalues must be variables
Rvalues can be any expression
Example:
distance = rate * time;
Lvalue: "distance"
Rvalue: "rate * time"
16. Data Assignment Rules
Compatibility of Data Assignments
Type mismatches
General Rule: Cannot place value of one type into variable of another
type
intVar = 2.99; // 2 is assigned to intVar!
Only integer part "fits", so that’s all that goes
Called "implicit" or "automatic type conversion"
Literals
2, 5.75, "Z", "Hello World"
Considered "constants": can’t change in program
17. Literal Data
Literals
Examples:
2 // Literal constant int
5.75 // Literal constant double
"Z" // Literal constant char
"Hello World" // Literal constant string
Cannot change values during execution
Called "literals" because you "literally typed"
them in your program!
18. Escape Sequences
"Extend" character set
Backslash, preceding a character
Instructs compiler: a special "escape
character" is coming
Following character treated as
"escape sequence char"
Display 1.3 next slide
19. Arithmetic Precision
Precision of Calculations
VERY important consideration!
Expressions in C++ might not evaluate as you’d "expect"!
"Highest-order operand" determines type of arithmetic "precision"
performed
Common pitfall!
20. Arithmetic Precision Examples
Examples:
17 / 5 evaluates to 3 in C++!
Both operands are integers
Integer division is performed!
17.0 / 5 equals 3.4 in C++!
Highest-order operand is "double type"
Double "precision" division is performed!
int intVar1 =1, intVar2=2;
intVar1 / intVar2;
Performs integer division!
Result: 0!
21. Individual Arithmetic Precision
Calculations done "one-by-one"
1 / 2 / 3.0 / 4 performs 3 separate divisions.
First 1 / 2 equals 0
Then 0 / 3.0 equals 0.0
Then 0.0 / 4 equals 0.0!
So not necessarily sufficient to change
just "one operand" in a large expression
Must keep in mind all individual calculations
that will be performed during evaluation!
22. Type Casting
Casting for Variables
Can add ".0" to literals to force precision
arithmetic, but what about variables?
We can’t use "myInt.0"!
static_cast<double>intVar
Explicitly "casts" or "converts" intVar to
double type
Result of conversion is then used
Example expression:
doubleVar = static_cast<double>intVar1 / intVar2;
Casting forces double-precision division to take place
among two integer variables!
23. Type Casting
Two types
Implicit—also called "Automatic"
Done FOR you, automatically
17 / 5.5
This expression causes an "implicit type cast" to
take place, casting the 17 17.0
Explicit type conversion
Programmer specifies conversion with cast operator
(double)17 / 5.5
Same expression as above, using explicit cast
(double)myInt / myDouble
More typical use; cast operator on variable
24. Shorthand Operators
Increment & Decrement Operators
Just short-hand notation
Increment operator, ++
intVar++; is equivalent to
intVar = intVar + 1;
Decrement operator, --
intVar--; is equivalent to
intVar = intVar – 1;
25. Shorthand Operators: Two Options
Post-Increment
intVar++
Uses current value of variable, THEN increments it
Pre-Increment
++intVar
Increments variable first, THEN uses new value
"Use" is defined as whatever "context"
variable is currently in
No difference if "alone" in statement:
intVar++; and ++intVar; identical result
26. Post-Increment in Action
Post-Increment in Expressions:
int n = 2,
valueProduced;
valueProduced = 2 * (n++);
cout << valueProduced << endl;
cout << n << endl;
This code segment produces the output:
4
3
Since post-increment was used
27. Pre-Increment in Action
Now using Pre-increment:
int n = 2,
valueProduced;
valueProduced = 2 * (++n);
cout << valueProduced << endl;
cout << n << endl;
This code segment produces the output:
6
3
Because pre-increment was used
28. Console Input/Output
I/O objects cin, cout, cerr
Defined in the C++ library called
<iostream>
Must have these lines (called pre-
processor directives) near start of file:
#include <iostream>
using namespace std;
Tells C++ to use appropriate library so we can
use the I/O objects cin, cout, cerr
29. Console Output
What can be outputted?
Any data can be outputted to display screen
Variables
Constants
Literals
Expressions (which can include all of above)
cout << numberOfGames << " games played.";
2 values are outputted:
"value" of variable numberOfGames,
literal string " games played."
Cascading: multiple values in one cout
30. Separating Lines of Output
New lines in output
Recall: "n" is escape sequence for the
char "newline"
A second method: object endl
Examples:
cout << "Hello Worldn";
Sends string "Hello World" to display, & escape
sequence "n", skipping to next line
cout << "Hello World" << endl;
Same result as above
31. Formatting Output
Formatting numeric values for output
Values may not display as you’d expect!
cout << "The price is $" << price << endl;
If price (declared double) has value 78.5, you
might get:
The price is $78.500000 or:
The price is $78.5
We must explicitly tell C++ how to output numbers in our
programs!
32. Input Using cin
cin for input, cout for output
Differences:
">>" (extraction operator) points opposite
Think of it as "pointing toward where the data goes"
Object name "cin" used instead of "cout"
No literals allowed for cin
Must input "to a variable"
cin >> num;
Waits on-screen for keyboard entry
Value entered at keyboard is "assigned" to num
33. Prompting for Input: cin and cout
Always "prompt" user for input
cout << "Enter number of dragons: ";
cin >> numOfDragons;
Note no "n" in cout. Prompt "waits" on same
line for keyboard input as follows:
Enter number of dragons: ____
Underscore above denotes where keyboard entry
is made
Every cin should have cout prompt
Maximizes user-friendly input/output
34. Program Style
Bottom-line: Make programs easy to read and modify
Comments, two methods:
// Two slashes indicate entire line is to be ignored
/*Delimiters indicates everything between is ignored*/
Both methods commonly used
Identifier naming
ALL_CAPS for constants
lowerToUpper for variables
Most important: MEANINGFUL NAMES!
35. Libraries
C++ Standard Libraries
#include <Library_Name>
Directive to "add" contents of library file to
your program
Called "preprocessor directive"
Executes before compiler, and simply "copies"
library file into your program file
C++ has many libraries
Input/output, math, strings, etc.
36. Namespaces
Namespaces defined:
Collection of name definitions
For now: interested in namespace "std"
Has all standard library definitions we need
Examples:
#include <iostream>
using namespace std;
Includes entire standard library of name definitions
#include <iostream>
using std::cin;
using std::cout;
Can specify just the objects we want
37. Summary 1
C++ is case-sensitive
Use meaningful names
For variables and constants
Variables must be declared before use
Should also be initialized
Use care in numeric manipulation
Precision, parentheses, order of operations
#include C++ libraries as needed
38. Summary 2
Object cout
Used for console output
Object cin
Used for console input
Use comments to aid understanding of
your program
Do not overcomment