You are on page 1of 27

Introduction to Information &

Communication Technology

Lecture 9: Computer Programs & Languages


What Is a Computer Program?
Computer programs

• Also called software


• Are a list of instructions
• Instructions are called code
• CPU performs the instructions
Software Is Stored In Many Files

Executable files
Contain the instructions for the CPU
Have extensions of .exe, or .com

Dynamic link libraries


Partial executable file
Used to support executable files
Have .dll extensions
Software Is Stored In Many Files
Initialization files
Contain configuration settings for software
Have a .ini extension
Modern programs use the registry

Help files
Contain information about the software
Provides an online manual
Have a .chm or .hlp extension

Batch files
Used to automate tasks
Hold a series of OS commands
Have a .bat extension
Hardware/Software Interaction
Program execution
Software executes at the CPU level
Code to play a sound
Code generates an interrupt
CPU tells the sound card to play
Sound card plays the file
Programmer creates the code

Code
Statements written in a programming language
Writing Code
Hardware/Software Interaction

Machine code
Recall that computers think in binary
Code is translated into machine code
CPU executes the machine code

Programming languages
Simplifies the writing of code
Original code is called source code
Planning a Computer Program
Plans
The steps to solve a problem
Describe the expected results
Programming without a plan is difficult

Plans Tools
Pseudo code
Natural language statements that resemble code
Describes what must be done
Can be written by non programmers
How Programs Solve Problems
Program control flow
Order program statements are executed
Typically executed in order
Constructs can change the flow
Decision statements
Loops
Algorithm
Set of steps
Always leads to a solution
Flowcharts can describe algorithms
Structured tool for drawing algorithms
Algorithms appear in all programs
Object Oriented Programming
Also known as OOP
Enhances structured programming
Intuitive method of programming
Programming Languages
and the Programming
Process
Programming Languages
Used to generate source code
Avoids using machine code
Have strict rules of syntax
Symbols and punctuation have meaning
Spelling must be exact
Code is converted into machine language
Language Categories
First generation language
Machine languages
Written in binary
Different for every CPU
Language Categories
Second generation languages
Assembly languages
Statements that represent machine code
Code converted by an assembler
Still used to optimize video games
Language Categories
Third generation languages (3GL)
First higher level language
Supports structured and OOP
Code is reusable
Code is portable
Typically written in an IDE
C/C++ creates games and applications
Java creates web applets
ActiveX creates Web and Windows applets
Language Categories
Fourth generation languages (4GL)
Easier to use than 3GL
Coded in a visual IDE
Tools reduce the amount of code
Object oriented programming
Microsoft .Net is a language
Dream Weaver is an 4GL IDE
Microsoft.NET
Language Categories
Fifth generation language (5GL)
Mystery language
May not be created yet
Will create software automatically
WWW Development Languages
Markup languages
Describe how the text is formatted
Hyper Text Markup Language (HTML)
Basis of all web pages
Defines web structure using tags
Easy to learn and use
Created with a text editor
WWW Development Languages
Extensible Markup Language (XML)
Stores data in a readable format
Looks like HTML
Allows developers to create tags
Depends on HTML for formatting
XML
WWW Development Languages
Extensible HTML (XHTML)
Newer version of HTML
Stricter rules
Based on XML rules
WWW Development Languages
Extensible Style Sheet Language (XSL)
Format and displays XML documents
Rules that dictate formatting
Create a standard web page
WWW Development Languages
Cascading Style Sheets (CSS)
Format HTML, XHTML and XSL
Applies consistent formatting to all pages
WWW Development Languages
Scripting Languages
JavaScript
Developed by Netscape
Works inside of HTML
Page verification and simple animation
Based on Java
WWW Development Languages
Active Server Pages (ASP)
Developed by Microsoft
Based on Visual Basic
Good at connecting to Microsoft databases
Runs only on Microsoft servers
WWW Development Languages
Hypertext Pre-Processor (PHP)
Especially good at connecting to MySQL
Very popular language
Runs on UNIX and Windows

You might also like