Beruflich Dokumente
Kultur Dokumente
Assignment One
Group Members
Name id
1. Abebe Tedila 193/03
2. Hospital Tenaw 219/03
3. Mesfin Telay 232/03
4. Tiruworke Fentaw 244/03
1. What is programming language? Give example of programming languages and classify them as
object-oriented and non object-oriented programming languages?
The earliest programming languages predate the invention of the computer, and were used to direct
the behavior of machines such as Jacquard looms and player pianos. Thousands of different
programming languages have been created, mainly in the computer field, with many more being
created every year. Most programming languages describe computation in an imperative style, i.e., as
a sequence of commands, although some languages, such as those that support functional
programming or logic programming, use alternative forms of description.
A programming language is usually split into the two components of syntax (form) and semantics
(meaning). Some languages are defined by a specification document (for example, the C programming
language is specified by an ISO Standard), while other languages, such as Perl, have a dominant
implementation that is used as a reference.
Generally programming languages may be divided in to three general types:
1. Machine language: a language directly understands by a computer. It consists of strings of
numbers (zero’s (0) and one’s (1)) and it is also machine dependent.
2. Assembly language: are English like abbreviations. They are translated to machine language
using assembles.
3. High level languages: allows programmers to write instructions that look almost like everyday
English and contains commonly used mathematical notation.
Examples of programming languages are:
A. Non Object-oriented programming languages
C, Pascal, FORTRAN, COBOL, BASIC
B. Object-oriented programming languages
C++, Java, Visual Basic, Small talk ,C#,Cobra
2. Discuss the advantage of object-oriented and non object-oriented (structured or unstructured)
programming languages.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data
structures consisting of data fields and methods together with their interactions – to design
applications and computer programs. Programming techniques may include features such as
data abstraction, encapsulation, messaging, modularity, polymorphism, and inheritance.
A computer language can be aid to be Object Oriented if it provides support for the following:
A class is a blueprint, or prototype, that defines the variables (data) and the methods
Class
(operations) common to all objects of a certain kind.
An instance of a class. A class must be instantiated into an object before it can be
Object used in the software. More than one instance of the same class can be in existence at
any one time.
The act of placing data and the operations that perform on that data in the same
Encapsulation
class. The class then becomes the 'capsule' or container for the data and operations.
The reuse of base classes (superclasses) to form derived classes (subclasses).
Inheritance Methods and properties defined in the superclass are automatically shared by any
subclass.
Same interface, different implementation. The ability to substitute one class for
another. This means that different classes may contain the same method names, but
Polymorphism
the result which is returned by each method will be different as the code behind each
method (the implementation) is different in each class.