Monday 9 March 2015

PROGRAMMING LANGUAGES AND PROGRAM DEVELOPMENT

PROGRAMMING LANGUAGES AND PROGRAM DEVELOPMENT

(SUMMARY OF CHAPTER 13 BY PHILIP T. TETTEH 

(SB/BMS/12/0250)


WHAT COMPUTER PROGRAM AND PROGRAMMING LANGUAGE IS?
A program is simply aseries of instructions given to a computer to perform or direct it to carry out certain task/operations. A computer program therefore is a series of instructions that directs a computer to perform tasks. A Computer programmer is anyone who develops a computer by creating and modifying a computer program. These programmers mostly create a program by coding or writing a program’s instruction using a programming language. 
A computer language also refers to the means by which instructions and data are transmitted to computers. Put another way, computer languages are the interface between a computer and a human being. There are various computer languages, each with differing complexities. For example, the information that is understandable to a computer is expressed as zeros and ones (i.e., binary language). 

The five generational programming languages are;

  The first-generational language (1940-1956): this is the level of instructions and data that the processor is actually given to work on (which in conventional computers is a string of 0s and 1s).  They relied on machine language, the lowest-level programming language understood by computers to perform operations and they could only solve one problem at a time. Input was based on punched cards and paper tape, and output was displayed on printouts. The UNIVAC and ENIAC computers are examples of first-generation computing devices.

    II.    Second-generational language (1956-1963): second-generation language is sometimes called assembly language. An assembler or programmer converts the assembler language statements into machine language and also writes instructions using symbolic instruction codes.

  III.         Third-generational language (1964-1971):  third-generation language is a high-level programming language such as PL/I, C programming language, COBOL (Common BusinessOriented Language) or Java. It is a procedural language where the programmer writes instructions that tell the computer what to accomplish and how to do it. Over here, compiler translates an entire program before executing it and the interpreter convert and execute one code statement at a time. High-level languages often are machine independent. A machine-independent language can run on many different types of computers and operating systems.
  IV.         Fourth-generation language (1971-present): A 4GL is a nonprocedural language that enables users and programmers to access data in a database. With a nonprocedural language, the Programmer writes English-like instructions or interacts with a graphical environment to retrieve data from files or a database. Nonprocedural languages typically are easier to use than procedural languages. One popular 4GL is SQL.SQL is a query language that allows users to manage, update, and retrieve data in a relational DBMS. These languages allow database administrators to define a database, its structure and enable users to maintain and access the data in the database.
    V.         Fifth-generation language (Present and Beyond): 5GL is a programming language based on solving problems using constraints given to the program, rather than using an algorithm written by a programmer. These are computing devices based on artificial intelligence. The goal of fifth-generation computing is to develop devices that respond to natural language input and are capable of learning and self-organization.

2. WAYS TO DEVELOP WEB PAGES
A webpage can be defined as a document with its own address or a web document that is suitable for the World Wide Web and the web browser. Web developers use different kinds of techniques to create Web pages. Some of these techniques are explained below:
HTML (Hypertext Markup Language) is a special formatting language that programmers use to format documents for display on the Web. XHTML (extensible HTML) is a markup language that includes features of HTML and XML. XML and WML are popular formats used by Web developers. A scripting language is an interpreted language that programmers use to add dynamic content and interactive elements to Web pages. Popular scripting languages include JavaScript, Perl, PHP, Rexx, Tcl, and VBScript. Dynamic HTML (DHTML) is a type of HTML that allows developers to include more graphical interest and interactivity in a Web page.

3) STEPS IN THE PROGRAM DEVELOPMENT LIFE CYCLE
 The program development life cycle (PDLC) is a series of steps that programmers use to build Computer programs. There are six steps in the program development life cycle and these steps are:

      I.         Analyze requirements: Analyzing requirement is the first step of the program development cycle whereby the programmer analyses the requirements of the problem the program should solve, so that the programmer can begin to develop an appropriate solution. The programmer first initiate development by reviewing the requirements, meets the system analyst and users and identifies input, processing, outputs and data components.
    II.         Design solution: Here the programmers design the solution that will meet the users’ requirements that was gotten in the first step. The programmer designing the solution involves devising a solution algorithm to satisfy the requirement. The system can be designed using process modeling which is a structured design or object modeling which is also an object oriented design. The approach used during system development determines the techniques a programmer uses in designing a solution
  III.         Validate design: after programmers have developed or designed their solution algorithm, they should check or validate the accuracy of the designed program. During this step, the programmer checks the logic for accuracy and attempts to uncover logic errors. A logic error is a flaw in the design that causes inaccurate results. Desk check and an inspection are the two techniques for reviewing a solution algorithm.
  IV.         Implement design: The fourth stage of   implementing the design involves using a program development tool that assists the programmer by generating some or all code or includes writing the code that translates the design into a computer program. Coding a program involves translating the solution algorithm into a programming language (sometimes on paper) and then typing the programming language code into the computer.
    V.         Test solution: once the programmer codes and enters the program the next step is to test it. The errors that are uncovered during the process are the syntax and logic errors. That main reason program is tested is to ensure that the program runs correctly with no errors.
  VI.         Document solution: Documenting solution is the last step in program design life cycle and at this stage the programmer performs two activities, the first is to review the program code where the programmer removes any dead code. A dead code is any program instructions that a program never executes. Secondly, the programmer has to review all the documentation by making sure it is complete and accurate.
THE BASIC CONTROL STRUCTURES AND DESIGN TOOLS USED IN DESIGNING SOLUTIONS TO PROGRAMMING PROBLEMS.
A control structure shows the logical order of program instructions. It is also known as a construct. The three basic control structures are sequence, selection, and repetition. A sequence control structure shows one or more actions following each other in order. A selection control structure tells the program which action to take, based on a certain condition. The two types of selection control structures are the if-then-else control structure, which yields one of two possibilities which is true or false and the case control structure which can yield one of three or more possibilities. The repetition control structure enables a program to perform one or more actions repeatedly as long as a certain condition is met. The two forms of the repetition control structure are: the do-while control structure which tests a condition at the beginning of the loop in a process called a pretesand continues looping as long as a condition is true; and the do-until control structure which also tests a condition at the end of the loop, in a process called a posttesand continues looping until the condition is true.
DESIGNED TOOLS USED IN DESIGNING SOLUTIONS TO PROGRAMMING PROBLEMS.
Design tools help programmers to document a solution algorithm. There are two structured designed tools and these are program flowcharts and pseudo code. A design tool for object-oriented design is the Unified Modelling Language (UML). The program flowcharts, pseudocode and the unified modelling language are designed tools used in designing solutions to programming problems. A program flowchart which can also be termed as a flowchart graphically shows the logic in a solution algorithm whilst Pseudocode uses a condensed form of English to convey program logic. Unified Modelling Language (UML) on the other hand can be
explained as an adopted standard notation for object modelling and development.