Software Development CS 1 Rick Graziani Spring 2007
Dec 23, 2015
Software Development
CS 1
Rick Graziani
Spring 2007
Rick Graziani [email protected] 2
Definitions
Software or Program
Instructions that tell the computer what to do
Programmer
Someone who writes computer programs
Rick Graziani [email protected] 3
Instruction SetA vocabulary (list) of instructions which can be executed
by the CPU• The only instructions the CPU can run or execute• Example of a CPU’s Instruction Set
CPU Instruction Set
Instruction Set Instruction0001 Move0010 Compare0011 Bit test0100 Bit clear0101 Bit set0110 Add0111 See group 101000 See groups 11, 13, 141001 Move byte
Rick Graziani [email protected] 4
First Generation Languages(Machine Language)
• Programming computers using the CPU’s instruction set• Also known as Machine Language
Machine Code FileA software file which contains the instructions from the CPU’s
instruction set.
Rick Graziani [email protected] 5
Advantages of First Gen.
• Software programs execute (run) relatively very quickly
• Software programs are relatively small in size
• (Insignificant advantages today)
Disadvantages of First Gen.
• Difficult to write, very detailed and takes a long time
• Difficult to read
• Difficult to debug
debug = the process to find mistakes in a software program
First Generation Languages(Machine Language)
Rick Graziani [email protected] 6
Second Generation Languages(Assembly Language)
Assembly Language = The English-like instructions which are equivalent to the CPU’s instruction set
Source Code= The actual instructions written by a programmer
Compiler = Software which translates source code instructions of a particular language into machine code
Instruction Set Instruction0001 Move0010 Compare0011 Bit test0100 Bit clear0101 Bit set0110 Add0111 See group 101000 See groups 11, 13, 141001 Move byte
Rick Graziani [email protected] 7
Question: Which of these two files (source code file or machine code file) will the user need to run this software program?
Advantages of Second Gen.
• Easier to read than first gen.
• Easier to write than first gen.
• Easier to debug than first gen.
Disadvantages of Second Gen.
• Still very difficult to write programs
Second Generation Languages(Assembly Language)
Rick Graziani [email protected] 8
Using a compiler
Rick Graziani [email protected] 9
Third Generation Languages(High level languages)
Languages which are somewhere between machine language and the human language.
FORTRAN (Formula Translation) - 1950's
Language to allow scientists and engineers to program computers.
COBOL (Common Business Oriented Language) - 1960
Language primarily designed for US government and defense contractors to program business applications on the computer. Grace Hopper was one of the developers of COBOL.
BASIC (Beginner's All-purpose Symbolic Code) - 1960's
Alternative language to FORTRAN for beginning programming students.
Rick Graziani [email protected] 10
Pascal (named after Blaise Pascal, 17th century French mathematician) - 1970's
Language to teach proper structured programming.
Structured programming = Programming technique used to make programming more productive and easier to write. Stresses simplistic, modular programs.
ADA (named after Ada Lovelace (programmed the 19th century 'analytical engine') - late 1970's
Language developed to replace COBOL.
Third Generation Languages(High level languages)
Rick Graziani [email protected] 11
C (successor to BCPL or "B") - 1970's
Popular programming language on computers from microcomputers to super computers.
Faster and more efficient language. Very powerful language.
Source code example of a C Program (Displays Hello World! on the screen.)
#include <stdio.h>
main()
{
printf("Hello World!");
}
C++ (pronounced "C plus plus") - 1980's
Object oriented language which is compatible with C.
Third Generation Languages(High level languages)
Rick Graziani [email protected] 12
Advantages
• Easier to read, write and debug
• Faster creation of programs
Disadvantages
• Still not a tool for the average user to create software programs
• Requires very good knowledge of programming and of the language
Third Generation Languages(High level languages)
Rick Graziani [email protected] 13
Advantages
• Easier to read, write and debug
• Faster creation of programs
Disadvantages
• Still not a tool for the average user to create software programs
• Requires very good knowledge of programming and of the language
Third Generation Languages(High level languages)
Rick Graziani [email protected] 14
Writing a Software Program
Steps in writing a software program
1. Hardware (CPU)
2. Operating System
3. Programming Language
4. Brand of Compiler
5. Writing the Program
Rick Graziani [email protected] 15
Task
Write a program to convert binary numbers to decimal and decimal numbers to binary
Writing a Software Program
Rick Graziani [email protected] 16
1. Determine what kind of computer you want your program to run on
Macintosh?
Windows PC?
Mainframe?
Writing a Software Program
Rick Graziani [email protected] 17
2. Determine which operating system this computer (and the user) will be using
Windows XP?
Mac OSX?
Linux?
Writing a Software Program
Rick Graziani [email protected] 18
3. Determine which language you will be programming in.
C?
C++?
Java?
• C++
Writing a Software Program
Rick Graziani [email protected] 19
4. Determine the compiler for your language, operating system and hardware
Microsoft Visual C++?
Borland C++?
Watkins C++?
• Microsoft Visual C++
Writing a Software Program
Rick Graziani [email protected] 21
Compile the program into a machine code file and distribute it to the users via floppy diskette.
Writing a Software Program
Rick Graziani [email protected] 22
Fourth Generation Languages
Languages which are more like natural human languages
• uses English phrases
• common with data base languages
search for name equals “graziani” and state equals “ca”
Examples
dBase FoxPro Access
Oracle Informix SQL
Rick Graziani [email protected] 23
Fourth Generation Languages
Advantages• Average users can quickly learn to “query” the
database• Average users can easily learn how to write
programs• Programs are written faster
Disadvantages• Can not write sophisticate programs like word
processors, graphics, etc.• Mostly for data base applications like phone
information.
Rick Graziani [email protected] 24
The Year 2000What is the big deal?
Older computer systems
• limited RAM memory
• limited disk storage
• slower processors (CPUs)
The YEAR was stored using two bytes instead of four bytes, in order to save bytes in RAM and storage
• 67 instead of 1967
Rick Graziani [email protected] 25
Example:• 500,000 records
Save 1 million bytes 500,000 x 4 bytes (19xx) = 2 million bytes 500,000 x 2 bytes (xx) = 1 million bytes
• less storage on disk• less RAM memory needed• faster processing
The Year 2000What is the big deal?
Rick Graziani [email protected] 26
Problem
The year 2000 will be “00” or looked at by the computers as the year “1900”
Will cause miscalculations for everything from pension funds to horoscopes.
The Year 2000What is the big deal?
Databases and Relationships
Rick Graziani [email protected] 29
One-to-One Relationships
Rick Graziani [email protected] 30
One-to-Many Relationships
Rick Graziani [email protected] 31
One-to-Many Relationships
Software Development
CS 1
Rick Graziani
Spring 2007