Modularity. Methods & Class as program unit A method is comprised of statement sequences and is often viewed as the smallest program unit to be considered.

Slides:



Advertisements
Similar presentations
Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Advertisements

The ANSI/SPARC Architecture of a Database Environment
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Four Defining Your Own Classes.
Chapter 2: Modularization
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 9 Classes.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
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.
Classes & Objects Computer Science I Last updated 9/30/10.
Inheritance Java permits you to use your user defined classes to create programs using inheritance.
Interface & Abstract Class. Interface Definition All method in an interface are abstract methods. Methods are declared without the implementation part.
Modularity. Methods & Class as program unit A method is comprised of statement sequences and is often viewed as the smallest program unit to be considered.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
© Alan Burns and Andy Wellings, 2001 Programming in the Small n Aim: to remind you how to read/write programs in Ada 95, Java and ANSI C n Practicals will.
Essential Software Architecture Ian Gorton CS590 – Winter 2008.
Object-oriented Programming Concepts
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
© Alan Burns and Andy Wellings, 2001 Programming in the Small Aim: to remind you how to read/write programs in Ada 95, Java and ANSI C.
BPC.1 Basic Programming Concepts
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
9-Aug-15 Vocabulary. Programming Vocabulary Watch closely, you might even want to take some notes. There’s a short quiz at the end of this presentation!
Lesson15. JavaScript Objects Objects encapsulate data (properties) and behavior(methods); the properties and the methods of an object are tied together.
OOP- OBJECT OBJECT PROGRAMMING By KRATI SHARMA 02 XI-B ✏✏✏✏ ☺☻☺☻☺☻☺ ✏✏✏✏
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
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.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Recap (önemli noktaları yinelemek) from last week Paradigm Kay’s Description Intro to Objects Messages / Interconnections Information Hiding Classes Inheritance.
MSIS 670 Object-Oriented Software Engineering Week 1 Introduction to Java: Applications
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.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
1 Introduction Modules  Most computer programs solve much larger problem than the examples in last sessions.  The problem is more manageable and easy.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Chapter 8 - Additional Inheritance Concepts and Techniques1 Chapter 8 Additional Inheritance Concepts and Techniques.
MSIS 655 Advanced Business Applications Programming Week 1 Introduction to Java
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Introduction to Java Beans CIS 421 Web-based Java Programming.
Topics AliasesSubprograms Generics & Configurations.
Learners Support Publications Object Oriented Programming.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 26 - Java Object-Based Programming Outline 26.1Introduction.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
1 Chapter 5: Defining Classes. 2 Basics of Classes An object is a member of a class type What is a class? Fields & Methods Types of variables: –Instance:
Java™ How to Program, 9/e © Copyright by Pearson Education, Inc. All Rights Reserved.
SWE 4743 Abstraction Richard Gesick. CSE Abstraction the mechanism and practice of abstraction reduces and factors out details so that one can.
Package A package is a logical container that contains classes,interfaces sub packages. Package provide a unique name space to its members and provide.
Inheritance and Polymorphism. Superclass and Subclass Inheritance defines a relationship between objects that share characteristics. It is a mechanism.
Java – Methods Lecture Notes 5. Methods All objects, including software objects, have state and behavior. example, a student as an object has name, address,
A Survey of Object-Oriented Concept Oscar Nierstrasz.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
EGRE 6311 LHO 04 - Subprograms, Packages, and Libraries EGRE 631 1/26/09.
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Introduction to Unified Modeling Language (UML)
PHP Classes and Objects
Chapter 6 Methods: A Deeper Look
MSIS 655 Advanced Business Applications Programming
Rules for Producing Questions
Subprograms and Programmer Defined Data Type
Advanced Programming Behnam Hatami Fall 2017.
Object Oriented Programming in java
CPE 528: Lecture #3 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
Static is one of the modifiers that determine variable and method characteristics. The static modifier associates a variable or method with its class.
Information system analysis and design
Presentation transcript:

Modularity

Methods & Class as program unit A method is comprised of statement sequences and is often viewed as the smallest program unit to be considered as a subprogram. It is self-contained and designed for a particular task which represents an object behavior.

Object & Class properties Properties defined in a class can be distinguished into object and class proper- ties. Object properties are definitions that are specific to objects and apply to all objects from the same class. Class properties, on the other hand, apply only to the class even though the structure and behavior of objects of a class is defined by the class.

Counting Instance

Alternative Counting Instance

State of Objects

Share Attributes with static

Class Attributes The static variable count is also known as a class attribute. While a class definition specifies the structure and behavior of objects within, it may have its own attribute and method definitions.

Class Methods

Controlling Visibility

Packages While class definitions are practical modular units, the Java programming language has another mechanism that facilitates programming teams and reusable software units. The package facility allows for appropriate classes to be grouped into packages. As with standard design rationale for objects where relevant methods are placed in the same class definition, packages in Java form the next level of software containment for classes with logically related functionality.

Packages Packaging also partitions the name space to avoid name clashes. Teams of programmers maybe work indepedently, there is a chance that they may choose the same name for their classes. Packaging thus allows for the names of classes to be confined to originating package.

Packages

Import keyword