Programming Languages Intriduction to C++ programming
DaniyalManzoor3
15 views
20 slides
Jun 29, 2024
Slide 1 of 20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
About This Presentation
This is a presentation on different types of programming languages it has an introduction to C++ an it also has a history on C++ it also talks about levels of programming
it also has ruby and C# prgramming language
Size: 1.28 MB
Language: en
Added: Jun 29, 2024
Slides: 20 pages
Slide Content
Programming Languages
CC1021-Programming Fundamentals
Programming Languages
BASIC
FORTRAN
COBOL
C
C++
C#
Java
JavaScript
Python
Ruby
Visual Basic
Levels of Programming
•Programmerswriteinstructionsinvariousprogramming
languages,somedirectlyunderstandablebycomputersand
othersrequiringintermediatetranslationsteps.
•Programminglanguagesmaybedividedintothreegeneral
types.
1.MachineLanguages
2.AssemblyLanguages
3.High-LevelLanguages
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 3
Machine Languages, Assembly Languages, and High-level
Languages
•Three types of programming languages
1.Machine languages
–strings of numbers giving machine-specific instructions
–Example:
+1300042774
+1400593419
+1200274027
2.Assembly languages
–English-like abbreviations representing elementary computer operations (translated via
assemblers)
–Example:
LOAD BASE_PAY
ADD OVERPAY
STORE GROSSPAY
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 4
Machine Languages, Assembly Languages, and High-level
Languages (II)
3. High-level languages
•similar to everyday English and use mathematical notations
(translated via compilers)
•Example:
grossPay= basePay+ overTimePay
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 5
History of C and C++
•C++ evolved from C, which evolved from two previous programming
languages, BCPL and B
•ANSI C established worldwide standards for C programming
•C++ “spruces up” C and provides capabilities for object-oriented
programming
•objects -reusable software components, model things in the real world
•Object-oriented programs are easy to understand, correct and modify
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 6
Bjarne Stroustrup-Brief
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 7
C++ Standard Library
•C++ programs consist of pieces called classesand functions
•There are rich collections of existing classes and functions in the C++
standard library available for all programmers to use
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 8
Java and Java How to Program
•Java used to
•Create web pages with dynamic and interactive content
•develop large-scale enterprise applications
•enhance the functionality of Web servers
•provide applications for consumer devices (such as cell phones, pagers, and
personal digital assistants)
•Java How to Program
•closely followed the development of Java by Sun
•teaches first-year programming students the essentials of graphics, images,
animation, audio, video, database, networking, multithreading, and
collaborative computing
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 9
Other High-level Languages
•A few other high-level languages have achieved broad acceptance
•FORTRAN
•for scientific and engineering applications
•COBOL
•used to manipulate large amounts of data
•Pascal
•intended for academic use
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 10
Introduction to C++ Programming
•The C++ language facilitates a structured and disciplined approach
to computer program design
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 11
Structured Programming
•structured programming
•a disciplined approach to writing programs
•clear, easy to test and debug, and easy to modify
•Multitasking
•specifying that many activities run in parallel
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 12
The Key Software Trend: Object Technology
•Objects
•reusable software componentsthat model items in the real world
•meaningful software units
•date objects, time objects, paycheck objects, invoice objects, audio objects,
video objects, file objects, record objects, etc.
•any noun can be represented as an object
•very reusable
•more understandable, better organized, and easier to maintain than
procedural programming
•Favor modularity
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 13
Who Uses C/C++?
System Level programming
Computer makers such as Sun, SGI, IBM, and HP
Airport
Computer chip manufacturers like Motorola & Intel
Software companies
Banks
Hong Kong Government
Hospital Authority
Telecommunications
Universities
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 14
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 15
Important Features of C/C++
Mostimportantfeatureof
C++:itsstrongandefficient
supportofbothStructured
ProgrammingandObject-
OrientedProgramming.
C++runson:
PC
Macintosh
Unixworkstations(also,Unix
versionsofC++arefree!)
supercomputers
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 16
What can you do by the end of this course?
Program the computer in applications such as the following:
Program a simple calculator
Program simple computer games
Program a simple text editor
Program a small inventory system for a small company
A student registration system
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 17
What to do for that?
Attention to the details
Hard work
Keep thinking about re-usability
Think about user interface
Understand that computer needs every instruction from you … really,
every instruction (what a dumb machine)
Comment … Comment… Comment
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 18
Problem Solving Skills
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 19
Design Recipe
To design a program properly, we must:
•Analyze a problem statement, typically expressed as a word
problem
•Express its essence, abstractly and with examples
•Formulate statements and comments in precise language
•Evaluate and revise the activities in light of checks and tests
•PAY ATTENTION TO DETAIL
•These skills are useful for anybody
•In this course should follow these guidelines
Saturday, June 29, 2024 Dr. Muhammad Nadeem Ashraf 21