Computer Science, asked by bhattacharyaniohiles, 6 months ago


1. What are the two major types of programming languages ?
2. Briefly explain the two major types of programming languages.
3. Why are low level languages considered close to the machine ?
4. Why is it easier to program with high level languages ? Why are high level languages considered
close to the programmer ?
5. Can you give examples of programming languages belonging to each generation ?
6. What are programming paradigms ? Give names of some popular programming paradigms.
7. What is major characteristic of procedural programming ?
8. What is major characteristic of modular programming ? How is it similar to procedural
programming ?
9. What are the shortcomings of procedural and modular programming approaches ?
10. Write a short note on OO programming
11. How does OOP overcome the shortcomings of traditional programming approaches ?
12. What is the difference between object and class ? Explain with examples.
13. Explain briefly the concept of data abstraction with the help of an example.
14. Explain briefly the concept of encapsulation with the help of an example.
15. How the data is hidden and safe if encapsulation is implemented ? Explain with example.
16. Simulate a daily life example (other than the one mentioned in the chapter) that explains
encapsulation
17. What is inheritance ? How is it useful in programming terms ?
18. What are the advantages offered by inheritance ?
19. How is reusability supported by inheritance ? Explain with example.
20. What is polymorphism ? Explain with example.
21. Do you think OOP is more closer to real world problems ? Why? How?
22. What are object-based languages ? Give an example of object-based language.
23. What are the advantages and disadvantages of using object oriented programming ?​

Answers

Answered by chandrikapoorna21
14

Answer:

1. Low level language

a) Machine language (1GL)

b) Assembly language (2GL)

2. High level language

a) Procedural-Oriented language (3GL)

b) Problem-Oriented language (4GL)

c) Natural language (5GL)

1. Low level language

This language is the most understandable language used by computer to perform its operations. It can be further categorized into:

a) Machine Language (1GL)

Machine language consists of strings of binary numbers (i.e. 0s and 1s) and it is the only one language, the processor directly understands. Machine language has an Merits of very fast execution speed and efficient use of primary memory.

Merits:

¨ It is directly understood by the processor so has faster execution time since the programs written in this language need not to be tanslated.

¨ It doesn’t need larger memory.

Demerits:

¨ It is very difficult to program using 1GL since all the instructions are to be represented by 0s and 1s.

¨ Use of this language makes programming time consuming.

¨ It is difficult to find error and to debug.

¨ It can be used by experts only.

b) Assembly Language

Assembly language is also known as low-level language because to design a program programmer requires detailed knowledge of hardware specification. This language uses mnemonics code (symbolic operation code like ‘ADD’ for addition) in place of 0s and 1s. The program is converted into machine code by assembler. The resulting program is reffered to as an object code.

Merits:

¨ It is makes programming easier than 1GL since it uses mnemonics code for programming. Eg: ADD for addition, SUB for subtraction, DIV for division, etc.

¨ It makes programming process faster.

¨ Error can be identified much easily compared to 1GL.

¨ It is easier to debug than machine language.

Demerits:

¨ Programs written in this language is not directly understandable by computer so translaters should be used.

¨ It is hardware dependent language so programmers are forced to think in terms of computer’s architecture rather than to the problem being solved.

¨ Being machine dependent language, programs written in this language are very less or not protable.

¨ Programmers must know its mnemonics codes to perform any task.

2. High level language

Instructions of this language closely resembles to human language or English like words. It uses mathematical notations to perform the task. The high level language is easier to learn. It requires less time to write and is easier to maintain the errors. The high level language is converted into machine language by one of the two different languages translator programs; interpreter or compiler.

High level language can be further categorized as:

a) Procedural-Oriented language (3GL)

Procedural Programming is a methodology for modeling the problem being solved, by determining the steps and the order of those steps that must be followed in order to reach a desired outcome or specific program state. These languages are designed to express the logic and the procedure of a problem to be solved. It includes languages such as Pascal, COBOL, C, FORTAN, etc.

Merits:

¨ Because of their flexibility, procedural languages are able to solve a variety of problems.

¨ Programmer does not need to think in term of computer architecture which makes them focused on the problem.

¨ Programs written in this language are portable.

Demerits:

¨ It is easier but needs higher processor and larger memory.

¨ It needs to be translated therefore its execution time is more.

b) Problem-Oriented language (4GL)

It allows the users to specify what the output should be, without describing all the details of how the data should be manupulated to produce the result. This is one step ahead from 3GL. These are result oriented and include database query language.

Eg: Visual Basic, C#, PHP, etc.

The objectives of 4GL are to:

Ø Increase the speed of developing programs.

Ø Minimize user’s effort to botain information from computer.

Ø Reduce errors while writing programs.

Merits:

¨ Programmer need not to think about the procedure of the program. So, programming is much easier.

Demerits:

¨ It is easier but needs higher processor and larger memory.

¨ It needs to be translated therefore its execution time is more.

c) Natural language (5GL)

Natural language are stil in developing stage where we could write statrments that would look like normal sentences.

Merits:

¨ Easy to program.

¨ Since, the program uses normal sente

nces, they are easy to understand.

¨ The programs designed using 5GL will have artificial intelligence (AI).

¨ The programs would be much more interactive and interesting.

Demerits:

¨ It is slower than previous generation language as it should be completely translated into binary code which is a tedious task.

¨ Highly advanced and expensive electronic devices are required to run programs developed in 5GL. Therefore, it is an expensive approach.

These are the different types of programming languages with their merits and demerits.

Answered by adityaphukan
2

Answer:

brifly explain the two major types of programming languages

Similar questions