Vous êtes sur la page 1sur 4

question 1.

different types of programming languages:


There are four types of programming languages 1. Structured Programming Language: Structured programming is a special type of procedural programming. It provides additional tools to manage the problems that larger programs were creating. Structured programming requires that programmers break program structure into small pieces of code that are easily understood by the student. It also frowns upon the use of global variables and instead uses variables local to each functions. One of the well known features of structural programming language is that it does not allow the use of the GOTO statement. It is often associated with a top-down approach to design. The top-down approach begins with an initial overview of the system that contains minimal details about the different parts. Subsequent design iterations then add increasing detail to the components until the design is complete. The most popular structured programming languages include C, and Pascal etc. 2. Object-Oriented Programming Language: In Object-oriented programming language more emphasis is given on data and user defined datatypes are also used. In object oriented programs, the designer specifies both the data structures and the types of operations that can be applied to those data structures. This pairing of a piece of data with the operations that can be performed on it is known as an object. Objects can store state information and interact with other with other objects, but generally each object has a different role o play. There are several key concepts in object-oriented programming (OOP). A class is a similar types of or prototype from which objects are created, so it describes a collection of variables and methods These methods can be accessible to all other classes (public methods) or can have restricted access (private methods) and even protected data so that not all member can be able to access the data. 3. Procedural Programming Language: Procedural programming specifies a list of operations that the program must complete to reach the desired function. This one of the simpler programming methods, where a program is represented much like a cooking list. Each program has a starting point, a list of operations to complete, and an ending point. This approach is also known as imperative programming.

Procedures, also known as functions, subroutines,global data or methods,also jump statements are used to call the sub routines. are small sections of codes those perform a specific operation. A procedure is effectively a list of computations to be carried out. Procedural programming can be compared to unstructured programming, where all of the codes are kept in a single large block. procedural programming allows a section of code to be re-used in the program without making multiple copies. It also makes it easier for programmers to understand and maintain program structures and functions which are used in the program for a better understandings o the program.

4.monolithic programming language: monolithic programming language uses a flat physical structure,and go to as a jump statement. it also uses global data and no concept of function is used. monolithic programming indicates the program which only contain one single function and Code can be reused in other programs. in monolithic programming language it is very Difficult to check error on large programs.

Question 2: features of object oriented programming language: 1: Objects: 2: class: 3: encapsulation: 4: data abstraction: 5: inheritance:

6: polymorphism: 7: dynamic biding: 8: message passing:

1: object: object is an instance of a class like a customer which has name, account no, address, balance etc. object contains a data and function and the functions communicate with each other. 2: class: A class is a collection of similar types of object and it is also called a user defined data type, in a class we define both member variable and function and once a class is defined we have created our own user defined data type which contains data and function. Example, fruit like grape, mango and orange are objects of fruit class. 3: encapsulation: Encapsulation is a method for protecting data from unwanted access or alteration by packaging it in an object where it is only accessible through the object's interface, and it is also the wrapping of data and code. And it is often done by using the concept of data hiding. 4: data abstractions: This means getting the final output i.e one cannot be able to see what is going on inside of the data. Example car system like break, gear, horn etc one does not understand how all this functions but can see the final output. 5: inheritance: it is the process by which object of one class acquire the properties of another class. The new class or object is called a child or subclass or derived class while the original class is called parent or base class. Reusability: Reusability is nothing but re- usage of structure without changing the existing one but adding new features or characteristics to it.

6: polymorphism: It is the ability to take more than one form also overloading function is used here. That is making a function or operator to act in different forms depending on the place they are present is called overloading is one in which we define new operations to these operators and make them operate on different data types. 7: dynamic biding: (late or runtime biding) it is a code associated with given function call is not known until the time of call at runtime. 8: message passing: 1. used in creating class. 2. creating objects from class definition. 3. establishing a communication among objects.

Vous aimerez peut-être aussi