0% found this document useful (0 votes)
10 views37 pages

Week 1

The Advanced Programming course (SE226) aims to enhance students' programming skills in Python and C++, covering data structures, libraries, and methodologies through theoretical and practical sessions. Students will complete a project that applies course concepts, with evaluations based on lab work, a project, a midterm, and a final exam. The course also explores various programming languages and paradigms, including imperative, object-oriented, functional, and logic programming.

Uploaded by

esin tan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views37 pages

Week 1

The Advanced Programming course (SE226) aims to enhance students' programming skills in Python and C++, covering data structures, libraries, and methodologies through theoretical and practical sessions. Students will complete a project that applies course concepts, with evaluations based on lab work, a project, a midterm, and a final exam. The course also explores various programming languages and paradigms, including imperative, object-oriented, functional, and logic programming.

Uploaded by

esin tan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Advanced Programming

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.

• Python and C++ languages will be used.

• Students will be exposed to commonly used data structures, libraries,


methodologies and tools by experiencing them first in theory, then in
practical laboratory sessions.

• Students will prepare a project that meets the requirements by applying


methods given in the course.
Learning Outcomes
The students who succeeded in this course;
1. develop programs in multiple languages,
2. control the flow in multiple programming languages,
3. construct data structures in multiple languages,
4. define functions in multiple languages,
5. access data resources,
6. build a program that meets requirements using complex methods,
structures and data resources.
Couse Textbooks & Suggested Materials
• Python for Everybody: Exploring Data in Python 3, Charles Severance,
CreateSpace Independent Publishing Platform, 978-1530051120
• C++ How to Program, 10/E Deitel & Deitel©2015 ISBN-10:
9780134448237
• Python Programming Fundamentals, Kent D. Lee, ISBN 978-1-4471-
6642-9
• The Python Language Reference
https://docs.python.org/3/reference/index.html
• Interactive Python Tutorial https://www.learnpython.org/
Weekly Schedule (tentative)
Evaluation
Semester Activities Number Weigthing
Laboratory / Application 1 20
Project 1 20
Midterm 1 30
Final Exam 1 30
Total 4 100

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

• Low-level languages are closer to the language used by a computer,


while high-level languages are closer to human-languages.
Machine / High Level
Machine /Assembly
High Level Languages
Programming Paradigms
Paradigm is a method to solve some problem or do some task

Programming paradigm is an approach to solve problem using some


programming language → Different Programming Languages
Programming Domains

• Scientific applications

• In the early 40s computers were invented for scientific applications.


• The applications require large number of floating point computations.
• Fortran was the first language developed scientific applications.
• ALGOL 60 was intended for the same use.

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

LISP → (print "Hello World")


Programming Domains
• Scripting languages
• Put a list of commands, called a script, in a file to be executed.
• The language, named sh (for shell), began as a small collection of commands that
were interpreted as calls to system subprograms that performed utility functions,
such as file management and simple file filtering.
• awk, another scripting language, began as a report-generation language but later
became a more general-purpose language.
• The Perl language, developed by Larry Wall, was originally a combination of sh and
awk.
• JavaScript (Flanagan, 1998) is a scripting language developed by Netscape.
• JavaScript is used mostly as a client-side scripting language.
• JavaScript is embedded in HTML documents and is interpreted by a browser that
finds the code in a document that is being displayed.
• PHP is a scripting language used on Web server systems. Its code is embedded in
HTML documents. The code is interpreted on the server before the document is sent
to a requesting browser.
Programming Domains

• Scripting languages

• Javascript → console.log("Hello World");

• PHP → echo "Hello World";

• 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

You might also like