 Computer Science 1MD3 Introduction to Programming Michael Liut Ming Quan Fu Brandon.

Slides:



Advertisements
Similar presentations
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Advertisements

Chapter 10 THINKING IN OBJECTS 1 Object Oriented programming Instructor: Dr. Essam H. Houssein.
Classes & Objects Computer Science I Last updated 9/30/10.
Chapter 1 Object-Oriented System Development
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
Object-Oriented PHP (1)
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
Object Oriented System Development with VB .NET
What is an object? Your dog, your desk, your television set, your bicycle. Real-world objects share two characteristics: They all have state and behavior;
1 Basic Object Oriented Concepts Overview l What is Object-Orientation about? l What is an Object? l What is a Class? l Constructing Objects from Classes.
OBJECT ORIENTED ANALYSIS & DESIGN Vassilka Kirova Department of Computer & Information Science NJIT.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Chapter 4 Object and Object-Relational Databases (Part ½: Object-Oriented Concepts) Lecturer: H.Ben Othmen Department of Computer Science, Umm Al-Qura.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
CSCI-383 Object-Oriented Programming & Design Lecture 15.
BACS 287 Basics of Object-Oriented Programming 1.
Object Oriented Programming
Introduction To System Analysis and design
Introduction to Object-oriented programming and software development Lecture 1.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
CSCI-383 Object-Oriented Programming & Design Lecture 9.
Object Oriented Design and Programming Alan Goude Room: Sheaf 9323.
CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.
 Computer Science 1MD3 Introduction to Programming Michael Liut Ming Quan Fu Brandon.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Unified Modeling Language, Version 2.0
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Chapter 7 Objects and Classes 1 Fall 2012 CS2302: Programming Principles.
Software Development. Software Developers Refresher A person or organization that designs software and writes the programs. Software development is the.
OOP Class Lawrence D’Antonio Lecture 3 An Overview of C++
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
 Computer Science 1MD3 Introduction to Programming Michael Liut Brandon Da Silva
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
 Computer Science 1MD3 Introduction to Programming Michael Liut Ming Quan Fu Brandon.
OOAD Unit – I OBJECT-ORIENTED ANALYSIS AND DESIGN With applications
Elements of OO Abstraction Encapsulation Modularity Hierarchy: Inheritance & Aggregation 4 major/essential elements3 minor/helpful elements Typing Concurrency.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Learners Support Publications Object Oriented Programming.
CSC 131 Fall 2006 Lecture # 6 Object-Oriented Concepts.
CS 3050 Object-Oriented Analysis and Design. Objectives What is “Object-Oriented?” Object-Oriented Approach Vs. Structured Approach How Has the Object-Oriented.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
 Computer Science 1MD3 Introduction to Programming Michael Liut Ming Quan Fu Brandon.
Basic Concepts of Object Orientation Object-Oriented Analysis CIM2566 Bavy LI.
Salman Marvasti Sharif University of Technology Winter 2015.
OOP (Object Oriented Programming) Lecture 1. Why a new paradigm is needed? Complexity Five attributes of complex systems –Frequently, complexity takes.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science)
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Lecture 2 Object-oriented programming. Definitions of OOP OOP is a programming paradigm, which utilizes encapsulation, inheritance and polymorphism. (From.
CSIS 4850: CS Senior Project – Spring 2009 CSIS 4850: Senior Project Spring 2009 Object-Oriented Design.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Object Oriented Paradigm OOP’s. Problems with Structured Programming As programs grow ever larger and more complex, even the structured programming approach.
CSC 205 Java Programming II Abstract Data Type. Abstraction The meaning of abstraction Abstraction arises from a recognition of similarities between certain.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
MAITRAYEE MUKERJI Object Oriented Programming in C++
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Object Oriented Systems Design
Programming paradigms
CHAPTER 5 GENERAL OOP CONCEPTS.
Chapter 3: Using Methods, Classes, and Objects
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Object oriented analysis and design
Lecture 11 Abstract Data Type
Handout-2(a) Basic Object Oriented Concepts
Abstraction and Objects
Introduction to Computer Science and Object-Oriented Programming
Presentation transcript:

 Computer Science 1MD3 Introduction to Programming Michael Liut Ming Quan Fu Brandon Da Silva Winter 2014

About the questions  We would like to answer your questions about python which you cannot understand well or some programs questions related to 1MD3.  You can ask us your questions about the assignments, for example, you cannot understand the assignment questions themselves, or if you need some help when you are doing the python programs.

How to get my help  any of us (TAs) and describe your questions in your and we will reply to you as soon as possible when we read your . But you need describe your questions clearly.  Michael Liut  Brandon Da Silva  Ming Quan Fu Office: ITB  Meet with one of us. Send first, and we may know when is the available time for us, we can make sure the meeting time.

Important day for 1MD3 Thu. Feb 13, :30-17:20 T28

Introduction  Programming Styles  Understanding Oriented Object Programming styles  Understanding Class and Object  Oriented Object Programming in python  Examples

Programming Styles  Procedure-oriented: (Python, 1MD3)  Algorithms  Object-oriented: (Python,1MD3)  Classes and objects  Logic-oriented: (not included in 1MD3)  Goals, often expressed in a predicate calculus  Rule-oriented: (not included in 1MD3)  If-then rules  Constraint-oriented: (not included in 1MD3)  Invariant relationships In this course, focus on the first two items. This is taken from [1]

Programming styles  Each of these styles of programming is based upon its own conceptual framework.  Each requires a different mindset, a different way of thinking about the problem. This is taken from [1]

OO programming language  Why we need OO technique?  We can think about biology

Understanding OO  Object-oriented programming ( OOP ) is a programming paradigm that represents concepts as "objects" that have data fields (attributes that describe the object) and associated procedures known as methods.programming paradigmobjectsdata fieldsmethods  Objects, which are usually instances of classes, are used to interact with one another to design applications and computer programs.instancesclasses  C++, Objective-C, Smalltalk, Java, C#, Perl, Python, Ruby and PHP are examples of object-oriented programming languages. C++Objective-CSmalltalkJavaC#PerlPythonRuby PHP This is taken from [2]

Understanding OO  Let us begin from an interesting example  We can think Car as one Class, and different car as subclass, or Think about Dog, and different dog…..

Understanding OO For all things object-oriented, the conceptual framework is the object model. There are four major elements of this model:  Abstraction  Encapsulation  Modularity  Hierarchy This is taken from [1]

Class and Object  What is a Class? Why do we need that?  What is an Object? Why do we need that?  Do we need to know more about Class and Object?

Understanding Class Four major elements of this model for Class:  Abstraction:  Encapsulation :  Modularity :  Hierarchy This is taken from [1]

Understanding Class: Abstraction  Abstraction is one of the fundamental ways that we as humans cope with complexity. [1]  Abstraction arises from a recognition of similarities between certain objects, situations, or processes in the real world, and the decision to concentrate upon these similarities and to ignore for the time being the differences" [3].  An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer. [1]

Understanding Class: Abstraction This is taken from [1]

Understanding Class: Abstraction  We can abstract different Classes and their relations from real project to form OO software design models  Input: real project requirements Output: different Classes By: Abstraction

Understanding Class: Encapsulation  Abstraction and encapsulation are complementary concepts.  Abstraction focuses upon the observable behavior of an object, whereas encapsulation focuses upon the implementation that gives rise to this behavior.  Encapsulation is most often achieved through information biding which is the process of hiding all the secrets of an object that do not contribute to its essential characteristics; This is taken from [1]

Understanding Class: Encapsulation This is taken from [1]

Understanding Class: Encapsulation  In OO, typically, the structure of a class or an object is hidden.  The implementation of classes methods or object methods are hidden This is taken from [1]

Understanding Class: Modularity First, thinking about the “toy bricks”  The act of partitioning a program into individual components can reduce its complexity to some degree.[1]  Although partitioning a program is helpful for this reason, a more powerful justification for partitioning a program is that it creates a number of well defined, documented boundaries wi0thin the program. These boundaries, or interfaces, are invaluable in the comprehension of the program [4].

Understanding Class: Modularity This is taken from [1]

Understanding Class and Object: Modularity  Modules serve as the physical containers in which we declare the classes and objects of our logical design.  For tiny problems, the developer might decide to declare every class and object in the same package.  For anything but the most trivial software, a better solution is to group logically related classes and objects in the same module, and expose only those elements that other modules absolutely must see. This is taken from [1]

Understanding Class and Object: Hierarchy Why we need Hierarchy?  The Meaning of Hierarchy Abstraction is a good thing, but in all except the most trivial applications, we may find many more different abstractions than we can comprehend at one time.  Encapsulation helps manage this complexity by hiding the inside view of our abstractions.  Modularity helps also, by giving us a way to cluster logically related abstractions. Still, this is not enough.  Hierarchy is a ranking or ordering of abstractions. This is taken from [1]

Understanding Class and Object: Hierarchy  This is taken from [1]

Overview of OOP Terminology  Class: A user-defined prototype for an object that defines a set of attributes that characterize any object of the class. The attributes are data members (class variables and instance variables) and methods, accessed via dot notation.  Class variable: A variable that is shared by all instances of a class. Class variables are defined within a class but outside any of the class's methods. Class variables aren't used as frequently as instance variables are.  Data member: A class variable or instance variable that holds data associated with a class and its objects.  Instance variable: A variable that is defined inside a method and belongs only to the current instance of a class. This is taken from [1]

OO Examples in Python This is taken from [5]

Reference  [1] Book, OBJECT-ORIENTED ANALYSIS AND DESIGN Grady Booch, Second Edition, SBN ,1998  [2]  [3] Keene. Object~Oriented Programming, p  [4] Lea, D. Aug.st 12, Users Guide to GIVV C++ Library. Cambridge, MA: Free Software Foundation, p. 12  [5]