Você está na página 1de 31

Nawroz University College Computer Science Department of Computer Science Stage: Second

Programming Languages


Programming languages

No. of Hours

No. of Units

Distribution of Marks
First Semester

Mid Year

Second Semester

Final Exam

Final Mark





100 2.5 2.5 20 10 2.5 2.5 40 20

Course Objectives
Teaching the student the fundamentals of object oriented programming in C# and Java. The properties and the new technologies of the modern language ( Virtual machines , Abstraction Mechanisms). C# language and its fundamentals and properties. Java language and its fundamentals and properties.

Robert W. sebesta, Concepts of programming languages, 10th edition , Pearson Addison Wesley, 2009. Robin A. Reynolds-haertle, OOP with Microsoft visual Basic.net and Microsoft visual C#.net step by step, Microsoft press, 2002. Jack Shiraz, Java Performance Tuning, OReilly & Associates, Inc. 2001.

F.Scott Barker, Visual C# 2005 express edition, Wiley Publishing, Inc. 2006.

History of programming languages Virtual machines Basic language translation Declarations and types Abstraction Mechanisms Introduction to object oriented programming C#: control structure C#: methods C#: arrays C#: collections

C#: object based programming C#: inheritance C#: polymorphism C#: strings and character C#: files and streams C#: exception handling C#: GUI C#: interface Java: build classes in java Java: control structure Java: inheritance

Reasons for Studying Concepts of Programming Languages History of programming languages Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Programming Environments

Programming languages:

Reasons for Studying Concepts of Programming Languages

Increased ability to express ideas
Improved background for choosing appropriate languages Increased ability to learn new languages

Reasons for Studying Concepts of Programming Languages

Better understanding of significance of implementation Better use of languages that are already known Overall advancement of computing

History of programming languages

Before 1940 :the languages were codes, punch cards . In the 1940s: the first recognizably modern, electrically powered computers were created, assembly language programs.

History of programming languages

The 1950s and 1960s: the first three modern programming languages were designed:

FORTRAN (1955), the "FORmula


LISP [1958], the "LISt Processor COBOL,(1959) the COmmon Business

Oriented Language

History of programming languages

1967-1978: establishing fundamental paradigms Simula, invented in the late 1960s,was the first language designed to support objectoriented programming. C, an early systems programming language Prolog, designed in 1972 was the first logic programming language.

History of programming languages

The 1980s: modules, performance One important new trend in language design was an increased focus on programming for large-scale systems through the use of modules, or large-scale organizational units of code.

History of programming languages

1980 - C++ (as C with classes, name changed in July 1983) 1983 Ada 1984 - Common Lisp 1987 - Perl

History of programming languages

The 1990s: the Internet age All such languages were object-oriented. These included Object Pascal, Visual Basic, and Java. 1991 - Visual Basic 1995 - Java 1995 - Delphi (Object Pascal) 1995 - JavaScript 1995 - PHP

History of programming languages

Current trends Constructs to support concurrent (parallel) and distributed programming. Integration with databases, including XML and relational databases. 2001 - C# 2001 - Visual Basic .NET

Whats new in programming languages

Commercial trend over past 5 years
Increasing use of type-safe languages: Java, C#, Scripting languages, other languages for web applications

Teaching trends
Java replacing C as most common intro language

Research and development trends

Java, C++

Programming paradigm
A programming paradigm is the logical approach used in software engineering that describes how a programming language is implemented. The term paradigm is best described as a "pattern or model." programming paradigm can be defined as a pattern or model used within a software programming language to create software applications.

Programming paradigm
A programming language can support multiple paradigms. For example, programs written in C++ or Object Pascal can be purely procedural, or purely object-oriented, or contain elements of both paradigms. Software designers and programmers decide how to use those paradigm elements.

Programming paradigm
The design goal of such languages is to allow programmers to use the best tool for a job, admitting that no one paradigm solves all problems in the easiest or most efficient way.

Programming Domains
Scientific applications Large numbers of floating point computations; use of arrays Fortran Business applications Produce reports, use decimal numbers and characters COBOL

Artificial intelligence Symbols rather than numbers manipulated; use of linked lists LISP

Programming Domains
Systems programming
Need efficiency because of continuous use C

Web Software

Eclectic collection of languages: markup (e.g., XHTML), scripting (e.g., PHP), generalpurpose (e.g., Java)

Language Evaluation Criteria

Readability: the ease with which programs can be read and understood Writability: the ease with which a language can be used to create programs Reliability: conformance to specifications (i.e., performs to its specifications) Cost: the ultimate total cost

Influences on Language Design

Computer Architecture
Languages are developed around the prevalent computer architecture, known as the von Neumann architecture

Programming Methodologies
New software development methodologies (e.g., object-oriented software development) led to new programming paradigms and by extension, new programming languages

Language Categories
Imperative Functional Logic Markup/programming hybrid

Language Categories
Central features are variables, assignment statements, and iteration
Include languages that support object-oriented programming Include scripting languages Include the visual languages Examples: C, Java, Perl, JavaScript, Visual BASIC .NET, C++

Language Categories
Main means of making computations is by applying functions to given parameters Examples: LISP, Scheme


Rule-based (rules are specified in no particular order) Example: Prolog

Language Categories
Markup/programming hybrid
Markup languages extended to support some programming Examples: JSTL, XSLT

Programming Environments
A collection of tools used in software development UNIX
An older operating system and tool collection Nowadays often used through a GUI (e.g., CDE, KDE, or GNOME) that runs on top of UNIX

Microsoft Visual Studio.NET

A large, complex visual environment Used to build Web applications and non-Web applications in any .NET language

Related to Visual Studio .NET, except for Web applications in Java

The study of programming languages is valuable for a number of reasons:
Increase our capacity to use different constructs Enable us to choose languages more intelligently Makes learning new languages easier

Most important criteria for evaluating programming languages include:

Readability, writability, reliability, cost

Major influences on language design have been machine architecture and software development methodologies