Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 33 trang
THÔNG TIN TÀI LIỆU
Cấu trúc
Software Development
Definitions
CPU Instruction Set
First Generation Languages (Machine Language)
Slide 5
Second Generation Languages (Assembly Language)
Slide 7
Using a compiler
Third Generation Languages (High level languages)
Slide 10
Slide 11
Slide 12
Slide 13
Writing a Software Program
Slide 15
Slide 16
Slide 17
Slide 18
Slide 19
Slide 20
Slide 21
Fourth Generation Languages
Slide 23
The Year 2000 What is the big deal?
Slide 25
Slide 26
Databases and Relationships
Relationships
One-to-One Relationships
One-to-Many Relationships
Slide 31
Slide 32
Slide 33
Nội dung
Software Development CS 1 Rick Graziani Spring 2007 Rick Graziani graziani@cabrillo.edu 2 Definitions Software or Program Instructions that tell the computer what to do Programmer Someone who writes computer programs Rick Graziani graziani@cabrillo.edu 3 Instruction Set A 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 Instruction 0001 Move 0010 Compare 0011 Bit test 0100 Bit clear 0101 Bit set 0110 Add 0111 See group 10 1000 See groups 11, 13, 14 1001 Move byte Rick Graziani graziani@cabrillo.edu 4 First Generation Languages (Machine Language) • Programming computers using the CPU’s instruction set • Also known as Machine Language Machine Code File A software file which contains the instructions from the CPU’s instruction set. Rick Graziani graziani@cabrillo.edu 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 graziani@cabrillo.edu 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 Instruction 0001 Move 0010 Compare 0011 Bit test 0100 Bit clear 0101 Bit set 0110 Add 0111 See group 10 1000 See groups 11, 13, 14 1001 Move byte Rick Graziani graziani@cabrillo.edu 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 graziani@cabrillo.edu 8 Using a compiler Rick Graziani graziani@cabrillo.edu 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 graziani@cabrillo.edu 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) [...]... Steps in writing a software program 1 Hardware (CPU) 2 Operating System 3 Programming Language 4 Brand of Compiler 5 Writing the Program Writing a Software Program Task Write a program to convert binary numbers to decimal and decimal numbers to binary Writing a Software Program 1 Determine what kind of computer you want your program to run on Macintosh? Windows PC? Mainframe? Writing a Software Program... using Windows XP? Mac OSX? Linux? Writing a Software Program 3 Determine which language you will be programming in C? C++? Java? • C++ Writing a Software Program 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 5 Write the program Writing a Software Program Compile the program into... average user to create software programs Requires very good knowledge of programming and of the language Third Generation Languages (High level languages) 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 Writing a Software Program Steps... and Relationships Relationships • • • One-to-One One-to-Many Many-to-Many One-to-One Relationships One-to-Many Relationships One-to-Many Relationships Many-to-Many Relationships (Not recommended) Software Development CS 1 Rick Graziani Spring 2007 . Software Development CS 1 Rick Graziani Spring 2007 Rick Graziani graziani@cabrillo.edu 2 Definitions Software or Program Instructions that tell the. Language Machine Code File A software file which contains the instructions from the CPU’s instruction set. Rick Graziani graziani@cabrillo.edu 5 Advantages of First Gen. • Software programs execute. create software programs • Requires very good knowledge of programming and of the language Third Generation Languages (High level languages) Rick Graziani graziani@cabrillo.edu 14 Writing a Software