Programming II. Modularity 2017/18

Similar documents
Setting the stage... Key Design Issues. Main purpose - Manage software system complexity by improving software quality factors

LECTURE 3: SOFTWARE DESIGN. Software Engineering Mike Wooldridge

OOPs: The Harsh Realities of Programming

B16 Object Oriented Programming

CHAPTER 5 GENERAL OOP CONCEPTS

CompuScholar, Inc. Alignment to Nevada "Computer Science" Course Standards

10. Abstract Data Types

Lecturer: Sebastian Coope Ashton Building, Room G.18

Sub- PPL Unit-I Class-SE Comp

Chapter 12 Object-Oriented Programming. Starting Out with Games & Graphics in C++ Tony Gaddis

Chapter 11. Categories of languages that support OOP: 1. OOP support is added to an existing language

Object Oriented Programming

Unit - IV CHAPTER - 13 INTRODUCTION TO OOP WITH C++ Part 1 Choose the best answer

Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila

Chapter 8: Class and Method Design

1. Write two major differences between Object-oriented programming and procedural programming?

CHAPTER 9 DESIGN ENGINEERING. Overview

Object-Oriented Programming Concepts

Introduction to Object-Oriented Programming

Client Code - the code that uses the classes under discussion. Coupling - code in one module depends on code in another module

ENCAPSULATION. private, public, scope and visibility rules. packages and package level access.

SYLLABUS. 1. Information regarding the programme 1.1 Higher education Babeş-Bolyai University of Cluj-Napoca

What are the characteristics of Object Oriented programming language?

Review&Preview 1/23/15, 4:08:07 PM 1. 3rd edition - standardized, and standard library allows programmer to start from a higher level

Binghamton University. CS-211 Fall Software Design

Sri Vidya College of Engineering & Technology

Elementary Concepts of Object Class

Modularity Guidelines for design in any programming language

Object-Oriented Programming

Object Oriented Programming

Lecture 23: Object Lifetime and Garbage Collection

Learning Objectives. C++ For Artists 2003 Rick Miller All Rights Reserved xli

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction


Modularity!! Guidelines for design! in any programming language!

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Chapter 2 Basic Principles of the Object-Oriented Paradigm 2.1 Abstraction

Domain Driven Design IS. An architectural methodology for evolving a software system that closely aligns to business requirements

Modules. Cardelli, 1996

PART - I 75 x 1 = The building blocks of C++ program are (a) functions (b) classes (c) statements (d) operations

The Object Oriented Paradigm

Recursion. Comp Sci 1575 Data Structures. Introduction. Simple examples. The call stack. Types of recursion. Recursive programming

Concepts of Programming Languages

Object Orientated Analysis and Design. Benjamin Kenwright

Review and Recursion

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

DRAFT for FINAL VERSION. Accepted for CACSD'97, Gent, Belgium, April 1997 IMPLEMENTATION ASPECTS OF THE PLC STANDARD IEC

Presented By Andrew Butt

Chapter 5 Object-Oriented Programming

Outline. Object Oriented Programming. Course goals. Staff. Course resources. Assignments. Course organization Introduction Java overview Autumn 2003

On the Impact of Aspect-Oriented Programming on Object-Oriented Metrics

New Programming Paradigms

What is a Programming Paradigm

INHERITANCE: EXTENDING CLASSES


G Programming Languages - Fall 2012

Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008.

Objectives. Architectural Design. Software architecture. Topics covered. Architectural design. Advantages of explicit architecture

Compulsory course in Computer Science

Today s lecture. CS 314 fall 01 C++ 1, page 1

PC204. Lecture 5 Programming Methodologies. Copyright 2000 by Conrad Huang and the Regents of the University of California. All rights reserved.

Object oriented programming. Encapsulation. Polymorphism. Inheritance OOP

Introduction to Object Oriented Programming. (Hebrew University, CS / Spring 2012 )

OO Frameworks. Introduction. Using Frameworks

Topics in Object-Oriented Design Patterns

Programming. Loriano Storchi.

Part 7 - Object Oriented Concepts Classes, Objects, Properties and Methods

Software Design and Analysis for Engineers

OBJECT ORIENTED PROGRAMMING USING C++

Programmazione. Prof. Marco Bertini

Software Design Fundamentals. CSCE Lecture 11-09/27/2016

Programming Languages & Paradigms PROP HT Course Council. Subprograms. Meeting on friday! Subprograms, abstractions, encapsulation, ADT

7. Introduction to Denotational Semantics. Oscar Nierstrasz

VB.NET. Exercise 1: Creating Your First Application in Visual Basic.NET

Object Oriented Programming. Assistant Lecture Omar Al Khayat 2 nd Year

Architectural Design

Data Structure. Recitation III

2. COURSE DESIGNATION: 3. COURSE DESCRIPTIONS:

Unit 1: Preliminaries Part 1: Course Introduction, Abstraction, and ADT s

Establishing the overall structure of a software system

Session 4b: Review of Program Quality

Module 16. Software Reuse. Version 2 CSE IIT, Kharagpur

Lecturer: William W.Y. Hsu. Programming Languages

AP Computer Science AB

Lecture 6 Introduction to Objects and Classes

WITH C+ + William Ford University of the Pacific. William Topp University of the Pacific. Prentice Hall, Englewood Cliffs, New Jersey 07632

Introduction to Object- Oriented Programming

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe

Writing a good seminar paper Seminar in Software and Service Engineering

CHAPTER 1 Fundamentals of Distributed System. Issues in designing Distributed System

Principles of Software Construction: Objects, Design and Concurrency. Introduction to Design. toad

Plan. Design principles: laughing in the face of change. What kind of change? What are we trying to achieve?

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.)

5/9/2014. Recall the design process. Lecture 1. Establishing the overall structureof a software system. Topics covered


MaanavaN.Com CS1203 OBJECT ORIENTED PROGRAMMING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

White Box Testing III

21) Functional and Modular Design

Data Abstraction. Hwansoo Han

Object Oriented Programming in Java. Jaanus Pöial, PhD Tallinn, Estonia

Transcription:

Programming II Modularity 2017/18

Module?

Lecture Outline Evolution and history of programming languages Modularity Example

History of Programming

Programming Paradigms How and why languages develop? How the OOP differs from previous paradigms? Aspects of software quality.

Large Projects Programming of large software projects qualitatively differs from creating of small programs. The reason for thinking about the principles of programming is the increasing complexity of computer programs.

Paradigms Imperative programming Declarative programming Functional programming Logic programming Modular programming Object oriented programming

Imperative Programming The sequence of steps (statements) by which we change the state of program variables. Structured programming Sequence, iteration (loops), branching (selection), jumps, recursion and abstraction. Procedural programming Derived from structured programming, based upon the concept of the procedure (subroutine, function) call. As we know from the most commonly used languages.

Modular Programming Top-down design of code. Division of the program into independent, interchangeable modules that provide partial functionality. The module contains everything necessary to ensure the functionality (data and algorithms).

Object Oriented Programming

Factors of Software Quality Internal and external factors. Internal factors are hidden from the user. (HOW) External factors describe the external behavior. (WHAT)

External Factors Correctness Robustness Reusability, extendibility, usability, compatibility,...

Key Factors

Other Factors

Modularity

Modul A software construction method is modular, then, if it helps designers produce software systems made of autonomous elements, modules, connected by a coherent, simple structure.

Modularity of Program Understandability Independence Composability Encapsulation Explicit interface Syntactic support

Understandability The module should provide a clearly defined and simple task, or a few clearly defined tasks.

Independence Each module must be relatively independent, and should have the minimum possible number of links to other modules. It would not be appropriate for all program modules to be interconnected and interdependent. The modules cannot be individually tested, understand or be transferred to another project.

Composability The modules need to be combined with each other. It must be possible to take the module and use it in another context, or even in another project.

Encapsulation Modules must have some privacy; it is desirable that any information that is not needed for clients of modules should be hidden inside the module. In practice, it shows that most of the functionality of the module are hidden, and only a small part is visible externally. Hidden parts of a module are often called module implementation and public parts are called interface of the module.

Explicit Interface It must be universally understood what assumptions module needs to perform its tasks.

Syntactic Support The modules of a computer program must be clearly defined as syntactic units of the program. From the source code of the programming language must be quite clear where a single module begins and ends.

Five Criteria and Rules Decomposability. Composability. Understandability. Continuity. Protection. Direct Mapping. Few Interfaces. Small interfaces (weak coupling). Explicit Interfaces. Information Hiding.

Criteria

Criteria

Rules

Example

Class x Object Class as a static description. Object as a run-time representation: state (data) behavior (algorithms)

Terminology Class Member function, method Member variable Object, instance of a class Constructor, destructor

Class Declaration

Class Definition (implementation)

Using the Class 1

Using the Class 2

Result

Using the Class 3

Seminar assignments Implement KeyValue class according to the lecture and create a build a linear structure of many (for example, thousands) of objects and work with it (display a list of all keys from the first to the last object, for example). Implement a similar class to KeyValue with value and key member variables of string type (class) and with two adjacent objects (pointers to objects). Implement a simple structure for animal identification; key is a decision criterion, and value is an animal name, species, etc. Put at least ten objects into the structure and then display its content in a suitable form.

Questions What is the main motivation for developing programming paradigms from the imperative to the object-oriented? What is imperative programming? What is modular programming? What are the main factors of software quality? What understandability of module? What is the independence of module? What is composability of modules? What is the encapsulation of module? What is the explicit interface of a module? What is the syntactic support for modularity? What are the five criteria for good modularity? What is meant by the five rules of good modularity?

Sources History of programming languages. Wikipedia. https://en.wikipedia.org/wiki/history_of_programming_languages#establishing_fundamental_paradigms Bertrand Meyer. Object-Oriented Software Construction. Prentice Hall 1997. [3-16, 39-52]