Introduction to Programming
Objectives
• Define a program and programming
• Define a programming language
• Identify computer hardware and software
components and their relevance to
programming (IDE)
• Discuss the importance of programming
to the society (Application Areas)
Introduction to Programming | 2
What is Programming?
Introduction
• Video
– https://www.youtube.com/watch?v=3tWM
Q3ZMjbg
Introduction to Programming | 4
Introduction
• A program is a set of instructions that
direct a computer to perform a certain
function.
• Computer Programming is the process of
developing a set of instructions to be
executed by a computer.
• Programming Language?
Introduction to Programming | 5
Introduction (Cont.)
• A Programming Language in Human Languages
computer technology is defined as, English, Kiswahili, Spanish
a set of conventions in which
instructions for the machine are
written.
• Programming Languages allow Programming Languages
humans to communicate to C, C++, Objective-C, Java, Android,
computers. Assembly/Machine Language
• A translator is needed to convert
High Level Programming Languages
to a Language the computer
understands. Compiler/Interpreter Computers and Machines
binary (zeros and ones - 0010001)
|
Hardware and Software
Class Exercise
• Write down atleast 2 hardware parts of a
computer
• Write down atleast 3 examples of
Operating Systems
• Write down atleast 5 examples of User
Programs
Introduction to Programming | 8
Computer Components
User Applications: Visual Studio
Software Operating System: Windows
Firmware (ROM): BIOS
Input: Keyboard
Output: Monitor
Hardware Processing: CPU
Memory: RAM
Storage: Hard Disk
Introduction to Programming | 9
Software and Programming
• All software are developed using one or
more programming languages
• An IDE (Integrated Development
Environment) runs at the User Application
level.
• Programmers use IDEs to create programs
Introduction to Programming | 10
Software and Programming
Programmer Language IDE
Eclipse, Android Studio,
Android Java
Intellij
iOS Objective-C xcode
Arduino Microprocessor C Arduino
Web html, php Eclipse, Visual Studio
Introduction to Programming | 11
Class Exercise
• Discuss why computers use machine code
(binary code) yet they are capable of
performing complex tasks. Why can't they
understand human language.
• How do computers recognize different
characters (e.g @, #, A, h, 5 etc) if they
can only process binary code?
Introduction to Programming | 12
Classification of Programming
Languages
|
Classification of Programming
Laguages
Programming Languages | 14
Translation of HL
• A compiler is a program that translates a
HL code into a Machine Code. An
interpreter does the same job.
• Compiling and Interpreting are
implementation of a particular language,
and not a property of the language itself.
src: http://net-informations.com/q/diff/cvsi.html
Compiling Interpreting
• code is reduced to a set of • code is saved in the same
machine-specific instructions format that you entered.
before being saved as an Translation is done at run time.
executable file. • A interpreted program is
• A compiled program is only translated by the target
executed by the target machine/computer before
computer/machine. execution.
Programming Languages | 15
Difference between Programming
Languages
|
Class Discussion
• Difference in programming languages depend on
(discuss):
1. Capabilities – Group 1
2. Syntax – Group 2
3. Case Sensitive – Group 3
4. Classification – Group 4
5. Age – Group 5
*Provide details about these differences
Programming Languages | 18
Home work
• Give an real-life example of an interpreter and
a compiler
• Explain the difference between an interpreted
program and a compiled program
• Discuss the advantages of compiled programs
over interpreted programs
• Discuss the advantages of interpreted programs
over compiled programs
Programming Languages | 19
Importance of Programming
Importance of Programming
• Programs are mainly developed to solve
human problems
– automate repetitive processes
– facilitate communication
– increase efficiency and improve quality of
products
– entertainment & games
– etc
Introduction to Programming | 21
Class Exercise
• Discuss at least 3 application areas of
computer programs
Introduction to Programming | 22
Home Work
• Discuss why we have so many
programming languages
• Discuss in depth one application area of
programming
Introduction to Programming | 23
References
• http://www.tutorialspoint.com/cprogramming/cp
rogramming_tutorial.pdf
• P. Aitken, B.L. Jones, Sams Teach Yourself C, 5th
Edition
• http://www.vanguardsw.com/dphelp4/dph00296.
htm
Introduction to Programming | 25
Ole Sangale Road, Madaraka Estate. PO Box 59857-00200, Nairobi, Kenya
Tel: (+254) (0)703 034000/200/300 Fax : +254 (0)20 607498
Email: info@strathmore.edu Website: www.strathmore.edu