Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming & S/W Development

Similar presentations


Presentation on theme: "Programming & S/W Development"— Presentation transcript:

1 Programming & S/W Development
Hun Myoung Park, Ph.D., Public Management and Policy Analysis Program Graduate School of International Relations International University of Japan

2 Outline Programming Languages Language Translators
Software Development Software Analysis and Design Programming Implementation & Maintenance Documentation

3 Programming Languages
3 Programming Languages To communicate between human beings and computers Instruct a computer (H/W) to do what you want to do Each computer can understand its own machine language only Instructions are written in programming languages and then translated into the corresponding machine language.

4 Machine Language First generation language Consists of 1 and 0
4 Machine Language First generation language Consists of 1 and 0 Only language that computers can understand Each computer has its own machine langue (machine dependent) No translation Difficult to write and read programs

5 Assembly Language Second generation language
5 Assembly Language Second generation language Replace machine language’s binary codes for instructions and addresses with corresponding symbols and mnemonics 1:1 match Translated by the assembler More technical and faster But less flexible and user friendly

6 High Level Languages 1 Less machine dependent
6 High Level Languages 1 Less machine dependent More readable and flexible (closer to human languages and farther away from machine language) But less efficient (bigger and slower) Need to be translated into a machine language (interpretation or compilation)

7 7 High Level Languages 2 BASIC (Beginner’s All-purpose Symbolic Instruction Code) FORTRAN (FORmula TRANslator) by IBM COBOL (Common Business Oriented Language) by ANSI. PL/1 Pascal ADA

8 High Level Languages 3 C by Bell Lab C++, and Visual C
8 High Level Languages 3 C by Bell Lab C++, and Visual C JAVA by Sun Microsystems Web programming (script) languages: Perl, PHP, Python, Ruby

9 Types of Languages 1 First generation (machine language)
9 Types of Languages 1 First generation (machine language) Second generation (assembly language) Third generation (high level language) Forth generation (query languages) Fifth generation (natural & intelligent languages)

10 10 Type of Languages 2 Low-level languages (i.e., machine & assembly language) High-level languages (e.g., C and Java) Script languages (e.g., Perl, PHP, Python)

11 11

12 Programming Paradigms
12 Programming Paradigms Procedural programming Object-oriented programming Functional programming Declarative programming

13 Procedural Programming 1
13 Procedural Programming 1 Imperative or structured languages Tells the computer what you want it to do step by step FORTRAN, COBOL, BASIC, C, Pascal, Ada

14 Procedural Programming 2
14 Procedural Programming 2 Procedures (actions) & objects (data) are independent Passive objects that cannot initiate an action by itself A subprogram (routine or module) is a section of the program that performs a particular task when it is called from the main program.

15 Object-oriented Programming 1
15 Object-oriented Programming 1 Active Objects have both data and methods (procedures or actions) Methods are not independent of but belong to the active object. Objects need stimulus to perform actions Visual Basic, Visual C, C++, Java, Smalltalk Even in script languages (PHP & Python)

16 Object-oriented Programming 2
16 Object-oriented Programming 2 A class is an abstract blueprint of objects that have data and methods An object is an (actualized) instance of the class (variables + actions) A class of human beings (name, gender, height… + eating, sleeping, speaking …) An object of human beings (Seohyun, 170cm, 40Kg … + eating milk, … )

17 Object-oriented Programming 3
17 Object-oriented Programming 3 class human { public name … public height … function eating (…) { } function studying (…) { ... } // end of class

18 Object-oriented Programming 4
18 Object-oriented Programming 4 Inheritance: a class can inherit from other classes. A class student inherits data and methods from a class human being and additionally has its own data and methods Student = human beings + student’s data and methods Faculty = human beings + faculty’s data and methods Codes are reusable (minimize redundancy)

19 Object-oriented Programming 5
19 Object-oriented Programming 5 Data abstraction and decoupling: separating objects from classes Encapsulation and information hiding: Data are bound closely with their methods. Polymorphism enables to define methods with the same name that do difference things depending on classes. A work() may mean teaching in a class faculty but farming in a class farmer.

20 Functional Programming
20 Functional Programming Define primitive functions and combine them to keep creating new functions LISP (LISt Programming) & Scheme

21 Declarative Programming
21 Declarative Programming Logical reasoning to answer queries Use deductive logic Prolog Report generators: query languages Query languages: SQL (structured query language) Application generators: Visual Basic, FOCUS

22 22 Language Translators

23 Language Translators 1 Computer can understand machine languages only
23 Language Translators 1 Computer can understand machine languages only Language translators translate source codes into the machine language. A source code file needs to be compiled and linked to be an object file, executable file.

24 24 Language Translators 2 Lexer reads a source code (program) character by character and assembles characters into reserved words (token) Parser performs syntactic analysis and converts tokens to nodes on a syntax tree. Code generator produces segments of machine code of each node. Optimizer inspects machine codes and eliminates redundancies.

25 Language Translators 3 Assembler translates a assembly program
25 Language Translators 3 Assembler translates a assembly program Interpreter (interactive) Compiler (non-interactive, batch)

26 26 Interpreter Interactive way of communicating between users and machines. Translates each line of the source programs one by one, run it without making an object file, and then return the result promptly. Java source Bytecode by Java compiler  interpreted by JVM emulator BASIC, LISP (LISt Processor) by MIT for artificial intelligence

27 27 Compiler Compiler translates a whole source code into an object code before executing it. Most high level languages (e.g., C and Java) are translated by their compilers. Source code  Object file  Linking libraries  Executable file A library is a collection of commonly used modules that are combined into the executable file.

28 28 Computer Software A collection of well organized instructions that a computer executes to achieve specific tasks. Algorithm or logic is a set of ordered steps to solve a problem. Programming and coding (writing statements) is only a part of system development

29 29 Software Development

30 30 Software Development In the system development stage, when customized software is needed Program development life cycle (PDLC) Problem clarification Program design Program coding Program testing Program documentation and maintenance

31

32 Problem Clarification
32 Problem Clarification Objectives and users (programming needs) Output to be produced by the systems Input required to get the desired output Processing to transform input to output Feasibility (e.g., budget, man powers, modification of old program?)

33 33 Design the Program Program logic in structured programming; modularization (subprogram or subroutine) Design details Pseudo-code (narrative outline) Flowcharts Control structure (logic structure) Structured work-through to review

34 34 Flowchart

35 Components of a Program
35 Components of a Program Variables (data type, constant, variable declaration and initialization) Input and output Expression (operators) Statements (assignment, compound statement, control statements) Subprogram: variables, parameters, call by value, call by reference

36 Control Structure Sequence Selection Iteration or loop If (else)
36 Control Structure Sequence Selection If (else) switch (case) Iteration or loop DO FOR WHILE

37 Control Structures 37 Selection (condition) Repetition (Loop)
If (score > 90) { grade = “A”; } elseif (score > 80) { grade = “B”; } else { grade = “C”; } for (i=1; i<x; 1) { sum = sum + i; while (i<x) { sum = sum +1; i = i + 1;

38 38 Coding A process of writing a program using a proper programming language The result is a source code (program file in the text format) Follow coding standards Documentation (comments or remarks) makes it easy to understand and check mistakes.

39 39 Compiling Interpret a source code (program file) and convert into an object file Source code  Compiling  Object file (object module) Linking  Executable file (load module) Linking combines object files and built-in libraries (commonly used modules)

40 40 Debugging A process of checking and correcting errors (bugs) in a program Errors Syntax error Logic error in the logic of a program Run-time error occurs while a program is running

41 41 Software Testing To check if the software meets the requirements and works as expected Unit testing (component testing), integration testing, system testing, and acceptance testing Running programs with test data Alpha test at developers’ site Beta test or pre-release test (outside test)

42 Implementation and Maintenance
42 Implementation and Maintenance Implementation to run the program on the information systems Installation and compatibility tests Maintenance (updating)

43 Documentation Description of the program development Data dictionary
43 Documentation Description of the program development Data dictionary Documentation for users Documentation for operators Documentation for programmers Documentation in source programs

44 44 Conclusion Software development is not the same as coding (programming). Importance of software test . Documentation in all stages.

45 References Stair and Reynolds Principles of information systems, 12th ed. Cengage Learning. Stair and Reynolds Information systems, 10th ed. Cengage Learning. Morley and Parker Understanding computers, 15th ed. Cengage Learning. Hutchinson and Sawyer Computers, Communications, and Information, 7th ed. Irwin/McGraw-Hill


Download ppt "Programming & S/W Development"

Similar presentations


Ads by Google