Pam Allan

HRS2423

Homework 10

December 6, 2000

  1. (Loudan, Review Question 5) What are the main principles of structured programming? Why is it the primary program design methodology in use today?

The three main principles of structured programming are modularizations of programs, use of standard control structures and single entry/single exit from control structures.

The reason structured programming is the primary program design methodology used today is

  1. (Loudan, Review Question 6) Write a recipe that includes a sequence control structure, a selection control structure, and an iteration control structure.
  1. (Loudan, Review Question 10) What are the primary characteristics that distinguish the different generations and levels of programming languages from one another?

Each generation of language has certain common features. In addition, languages are classified by “level. High-level languages are those that more closely resemble the English language; low-level languages are those that correspond more closely to binary zeros and ones.

First generation languages have the following characteristics: machine language, hard-wired instructions, numeric instructions and addresses, machine-dependent programming. Second generation languages have the following characteristics: symbolic instructions and addresses, translation of program with an assembler, machine-dependent programming. Typical languages: IBM BAL, VAX Macro. Third generation languages (3GL) have the following characteristics: problem-oriented languages, translation with compilers or interpreters, structured programming, database management systems. Typical languages for 3GL include COBOL, FORTRAN. Fourth Generation (4GL) have the following characteristics non-procedural languages, integrated data dictionaries, dynamic relational databases; makes possible rapid system development and prototyping. Fifth generation languages is a natural language resembling the English language.

  1. (Loudan, Review Question 11) How do 4GLs improve programmer and end-user productivity?

Within 4GLs, there are a number of options or generators that assist the programmer. This eases the workload because it allows programs to be created without a lot of intense programming. For example, screen generators help design input and output screens; application generators integrate other tools like report generators. Fourth generation languages allows nonprogrammers to create customized applications themselves without having to call on information systems support staff. This brings programming back to the end users.

  1. (Loudan, Review Question 12) Describe the differences between FORTRAN, COBOL, and BASIC, listing one key advantage and disadvantage for each.

FORTRAN was primarily developed to solve scientific, mathematical, and engineering problems that required repetitive numerical calculations and complex formulas. The advantage of FORTRAN is that it is able to calculate complex formulas and solve sophisticated numerical problems. The disadvantage of FORTRAN is that it is not able to handle a large volume of input/output operations or file processing

COBOL was developed to handle business problems. The advantage of COBOL is that it is very effective in reading, writing, and manipulating records and allows the programmer to specify input/output formats. Easy to write and read the language. The disadvantages of COBOL are that it is very wordy, therefore, the programs tend to be very long.

BASIC features an interactive processing environment, which allows the user to communicate with the computer as the program is being written and data is being input. The advantage of BASIC is that it is easy-to-understand. The disadvantage is that it can do too many things but does few things well

  1. (Loudan, Review Question 13) Why was Pascal developed? What uses does it serve?

Pascal was created as an alternative to BASIC as a teaching language. Pascal requires a more structured, organized approach to programming. The nature of the language forces programmers to design programs methodically and carefully. This is the reason it is a popular teaching language. Despite its success in academia, Pascal has had only modest success in the business world. Part of the resistance to Pascal by professional programmers stems from its inflexibility and lack of tools for developing large applications.

  1. (Loudan, Review Question 14) Why has C become the most popular programming language for microcomputer software application packages?

C has become a popular language for microcomputer software applications packages because C programs are machine independent and it can run on different kinds of computers. In addition, the C programming language is relatively small. It requires less memory than other languages..

  1. (Loudan, Review Question 16) What are the advantages and disadvantages of object-oriented programming? How does OOP differ from traditional programming languages?

One advantages of object-oriented programming (OOP) is that without having to rewrite the code to define all the initial attributes of the object, a predefined groups of classes can be created. The ability to reuse a basic object and just add the code for what you want to do saves programmers a lot of time. The time saved in reusing code is another advantage. Also, when code needs to be updated, it is an easier process because only the parent class has to modified. All members that fall under the parent class are automatically updated. When time is saved in maintaining the code, it results in lower costs. The disadvantage of OOP is that it difficult to learn.

OOP differs from traditional programming languages in that it focuses on the creation of objects. Objects are self-contained entities that consists of both data and procedures to manipulate the data. It is similar to a mini program. Traditional programming languages keep the procedures that manipulate the data separate from the data.