Week 1
Week 1
SE226
Prof. Dr. Senem Kumova Metin
Course Lecturer & Lab Assistant
Lecturer
Prof. Dr. Senem Kumova Metin
• Office: A312
• e-mail: [email protected]
• Office hour: Monday 13:00-14:00
Lab Assistant
• Hamza Çekirdek
• e-mail: [email protected]
Objective
• The main objective of this course is to improve programming skills of
students in multiple languages.
Attendance
• 70% Theory
• 80% Lab
Projects
• Project topic will be delivered in next weeks!
• Project groups will be built up by Lab Assistant
• Project will include coding!!
• Presentation and project report are mandatory (NO MAKEUP!!)
Advanced Programming
INTRODUCTION
Types of programming languages
• There are three types of programming language:
• Machine language (Low-level language)
• Assembly language(Low-level language)
• High-level language
• Scientific applications
Fortran →
program helloworld
print *, "Hello World”
end program helloworld
Programming Domains
• Business applications
• The first successful language for business was COBOL.
• Business languages are characterized by facilities for producing elaborate
reports, precise ways of describing and storing decimal numbers and
character data, and the ability to specify decimal arithmetic operations.
• The arrival of PCs started new ways for businesses to use computers.
• Spreadsheets and database systems were developed for business.
IDENTIFICATION DIVISION.
PROGRAM-ID. Hello-world.
PROCEDURE DIVISION.
DISPLAY "Hello World". .
Programming Domains
• Systems programming
• The OS and all of the programming supports tools are collectively known as its
system software.
• Need efficiency because of continuous use.
• A language for this domain must provide fast execution. Furthermore, it must
have low-level features that allow the software interfaces to external devices
to be written.
• The UNIX operating system is written almost entirely in C.
#include <stdio.h>
int main() {
printf("Hello World");
return 0;
}
Programming Domains
• Artificial intelligence
• Symbolic rather than numeric computations are manipulated.
• Symbolic computation is more suitably done with linked lists than arrays.
• LISP was the first widely used AI programming language.
• An alternative approach to AI applications: Prolog
• Scheme, a dialect of LISP
• Scripting languages
• Perl →
#!/usr/bin/perl
print "Hello World";
Programming Paradigms
Programming Paradigms
Imperative languages
• So called “Procedural”
• Computation by fully-specified and fully-controlled manipulation of
named data
• Data or values are stored in variables (memory locations), taken our
from memory, manipulated in ALU, then stored back in memory
locations. Finally the values of variables are seent to I/O devices
Von Neumann
Object Oriented Languages
The program is written as a collection of classes and object which are
meant for communication. The smallest and basic entity is object and
all kind of computation is performed on the objects only. More
emphasis is on data rather procedure. It can handle almost all kind of
real life problems which are today in scenario.
Advantages:
• Data security
• Inheritance
• Code reusability
• Flexible and abstraction
Object Oriented Languages
• Simula : first OOP language
• Java : developed by James Gosling at Sun Microsystems
• C++ : developed by Bjarne Stroustrup
• Objective-C : designed by Brad Cox
• Visual Basic .NET : developed by Microsoft
• Python : developed by Guido van Rossum
• Ruby : developed by Yukihiro Matsumoto
• Smalltalk : developed by Alan Kay, Dan Ingalls, Adele Goldberg
Functional Languages
• The functional programming paradigms has its roots in mathematics
and it is language independent.
• The key principal of this paradigms is the execution of series of
mathematical functions.
• Haskell : developed by Lennart Augustsson, Dave Barton
• Scala : developed by Martin Odersky
• Erlang : developed by Joe Armstrong, Robert Virding
• Lisp : developed by John Mccarthy
• ML : developed by Robin Milner
Lisp Example
Logic Languages
• To solve logical problems like puzzles, series etc.
• In logic programming we have a knowledge base which we know
before and along with the question and knowledge base which is
given to machine, it produces result.
• In logical programming the main emphasize is on knowledge base and
the problem. The execution of the program is very much like proof of
mathematical statement, e.g., Prolog
Prolog Example
Prolog Example
Implementation
Compilation
Compilation
Pure
Interpretation
Hybrid Interpretation
Hybrid Interpretation