Chair of Software Engineering Beyond Eiffel these slides contain advanced material and are optional.

Slides:



Advertisements
Similar presentations
C++ Language Fundamentals. 2 Contents 1. Introduction to C++ 2. Basic syntax rules 3. Declaring and using variables.
Advertisements

Coding Standard: General Rules 1.Always be consistent with existing code. 2.Adopt naming conventions consistent with selected framework. 3.Use the same.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Abstract Data Types Data abstraction, or abstract data types, is a programming methodology where one defines not only the data structure to be used, but.
PACS – 10/19/131 Object-Oriented Programming “Object-oriented programming opens the door to cleaner designs, easier maintenance, and greater code reuseability.”
Object-Oriented PHP (1)
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Dynamic Object-Oriented Programming with Smalltalk 1. Introduction Prof. O. Nierstrasz Summer Semester 2006.
Principles of Object-Oriented Software Development The language Eiffel.
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
Advanced Object-Oriented Programming Features
Programming Languages Structure
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
C# Programming: From Problem Analysis to Program Design1 Advanced Object-Oriented Programming Features C# Programming: From Problem Analysis to Program.
Lecture 9 Concepts of Programming Languages
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
Abstract Data Types and Encapsulation Concepts
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
+ Java vs. Javascript Jessi Style. + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming.
A First Program Using C#
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Comparison of OO Programming Languages © Jason Voegele, 2003.
CSE 425: Intro to Programming Languages and their Design A Few Key Ideas No particular language is a prerequisite for this course –However you should be.
Programming Languages and Paradigms Object-Oriented Programming.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
1 Chapter 5: Names, Bindings and Scopes Lionel Williams Jr. and Victoria Yan CSci 210, Advanced Software Paradigms September 26, 2010.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
G Programming Languages T he main themes of programming language design and use: –Model of computation –Expressiveness types and their operations.
An Object-Oriented Approach to Programming Logic and Design
Object Oriented Concepts & Principles Ingrid Kirschning & Gerardo Ayala.
Programming Languages
BIT 1003 – Presentation 7. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Eiffel Naeem Esfahani University of Tehran "Man cannot discover new oceans unless he has the courage to lose sight of the shore." -- Andre Gide.
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Computer Concepts 2014 Chapter 12 Computer Programming.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
JAVA BASICS Prepared by The Smartpath Information Systems
OOP Class Lawrence D’Antonio Lecture 3 An Overview of C++
An Object-Oriented Approach to Programming Logic and Design Chapter 3 Using Methods and Parameters.
OO as a language for acm l OO phrase l Mental model of key concepts.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
 Programming - the process of creating computer programs.
PHP vs. Python. Similarities are interpreted, high level languages with dynamic typing are Open Source are supported by large developer communities are.
 Class diagrams show the classes of the system, their interrelationships (including inheritance, aggregation, and association), and the operations and.
Object-Oriented Programming (OOP) What we did was: (Procedural Programming) a logical procedure that takes input data, processes it, and produces output.
1 Copyright © 1998 by Addison Wesley Longman, Inc. Chapter 10 Abstraction - The concept of abstraction is fundamental in programming - Nearly all programming.
STL CSSE 250 Susan Reeder. What is the STL? Standard Template Library Standard C++ Library is an extensible framework which contains components for Language.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
Classes, Interfaces and Packages
CS212: Object Oriented Analysis and Design Lecture 30: Namespace and Other Advanced Topics.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Presented By P.SRIVIDYA 085D1A0552 Programming Language.
Language Paradigms CS655.
Introduction to Object-oriented Programming
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
1.1 Reasons to study concepts of PLs
Object-Orientated Programming
Types of Programming Languages
Abstract Data Types and Encapsulation Concepts
OOP Aga private institute for computer science 5th grade
CMPE212 – Reminders Assignment 2 due today, 7pm.
Presentation transcript:

Chair of Software Engineering Beyond Eiffel these slides contain advanced material and are optional

Beyond Eiffel Eiffel was used in the course to introduce you to programming The goal is not to learn programming Eiffel The goal is to – Understand programming – Learn the concepts of programming – Learn how to programm well 2

How to program well Understand fundamental concepts of programming Understand when and how to apply these concepts Write code with readability in mind Know the language you are using Experience More experience 3

Which language should you use? All programming languages have advantages and disadvantages – Ease of use – Performance characteristics (speed, memory) – Applicability to problem domain – Availability of libraries and supporting tools – Personal experience – Company expertise / existing codebase –... Know the problem you want to solve Select the language accordingly 4

Programming language frequency TIOBE index top 10 languages December 2012 (sum up to 80%) 1.C18.7% 2.Java17.6% 3.Objective-C 11.1% 4.C++9.2% 5.C#5.5% 6.PHP5.5% 7.(Visual) Basic 5.2% 8.Python3.8% 9.Perl2.2% 10.Ruby1.7% 5 Source: Paradigms Object-oriented 58.5% Procedural 36.9% Functional 3.2% Logical 1.4% Type systems Statically typed 71.4% Dynamically typed 28.6%

Learning a new language Learning a new language consists of – Learning the syntax (fast) – Mapping known programming concepts to new syntax (fast) – Learning the conventions (medium) – Learning the libraries (long) 6

Some concepts in various languages Namespaces Encapsulation Inheritance Generics Contracts Function objects 7

Namespaces Global (Eiffel) Directory-based packages (Java) – Warnings if directory structure does not follow packages File-based modules (Python) – Module name = file name User-declared (C#) – Declare (multiple) arbitrary namespaces per file 8

Encapsulation Export status (Eiffel) – Granularity level of classes, no fully private – Attributes never writable from outside class Access modifier (Java, C#, C++, PHP) – Public (full acccess), private (only inside the class), protected (class + subclasses) Naming conventions (Python) – No access modifiers – Names starting with underscore should not be accessed from outside the class 9

Inheritance Static multiple inheritance (Eiffel, C++) – Name-Routine mapping defined at compile-time – Various conflict resolution schemes (renaming, virtual) Dynamic multiple inheritance (Python) – Inheritance ordering matters – Name resolution depth-first, left-to-right (+special cases) Single inheritance + Interfaces (Java, C#) – Single inheritance of full classes – Multiple inheritance of interfaces only Single inheritance (PHP) 10

Generics Generics (Eiffel) Generics (Java) – Safe co- and contravariance (Wildcards) – Type erasure Generics (C#) – No conformance Templates (C++) Dynamic typing (Python, PHP) 11

Contracts Built-in contracts (Eiffel) Contracts as a library (C#) – Library offering calls that are interpreted as preconditions / postconditions / invariants Assert statements (Java, C, Python) – Assertion in the beginning is a precondition – Assertion in the end is a postcondition – No contract inheritance 12

Function objects Agents (Eiffel) – Unique: open/closed arguments, open targets Function pointers (C) Functor (C++) Delegates (C#) Closures (Python) Anonymous inner classes (Java <8) See Lambda expressions (Java 8) – &seqNum=2 &seqNum=2 13