Object Orientated Programming OOP. What is it? What is this?

Slides:



Advertisements
Similar presentations
Basic Java Constructs and Data Types – Nuts and Bolts
Advertisements

Introduction to Programming Java Lab 1: My First Program 11 January JavaLab1.ppt Ping Brennan
Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view class.
Object-Oriented Programming. 2 An object, similar to a real-world object, is an entity with certain properties, and with the ability to react in certain.
Based on Java Software Development, 5th Ed. By Lewis &Loftus
INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
Object Oriented Programming in Java. Object Oriented Programming Concepts in Java Object oriented Programming is a paradigm or organizing principle for.
Chapter 2: Using Objects Part 1. To learn about variables To understand the concepts of classes and objects To be able to call methods To learn about.
Java Basics M Taimoor Khan
Chapter 1: Introduction
The Java Programming Language  Simple – but abstract  Safe  Platform-independent ("write once, run anywhere")  Has a Rich growing library  Designed.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
Object-Oriented Programming Chapter Two. Java Buzz Words Simple Architecture neutral Object oriented Portable Distributed High performance Interpreted.
©2004 Brooks/Cole Chapter 1: Getting Started Sections Covered: 1.1Introduction to Programming 1.2Constructing a Java Program 1.3The print() and println()
HST 952 Computing for Biomedical Scientists Lecture 2.
01 Introduction1June Introduction CE : Fundamental Programming Techniques.
Java Overview February 4, /4/2004 Assignments Due – Homework 1 Due – Reading and Warmup questions Project 1 – Basic Networking.
1 Data types, operations, and expressions Overview l Format of a Java Application l Primitive Data Types l Variable Declaration l Arithmetic Operations.
Classes with multiple methods Part 1. Review of classes & objects Early on, we learned that objects are the basic working units in object-oriented programs.
1 Programming & Programming Languages Overview l Machine operations and machine language. l Example of machine language. l Different types of processor.
Object Oriented Paradigm Programming Paradigms En Mohd Norafizal A.Aziz.
COMP 14: Primitive Data and Objects May 24, 2000 Nick Vallidis.
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
C++ fundamentals.
Defining Classes and Methods Chapter 4.1. Key Features of Objects An object has identity (it acts as a single whole). An object has state (it has various.
Object-oriented design Part 4: More UML. Interfaces An interface is a language construct specific to Java Java does not support multiple inheritance Interfaces.
OOP and Graphics. Object Oriented Programming The ‘classic’ point of view of a programmer was that the program instructions were the active part, the.
Chapter 1 - Introduction. Ch 1Goals To understand the activity of programming To learn about the architecture of computers To learn about machine code.
Unit 2: Java Introduction to Programming 2.1 Initial Example.
Introduction To Object-Oriented Programming. Object-Oriented Programming Class: Code that defines the behavior of a Java programming element called an.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
Overview of Previous Lesson(s) Over View  OOP  A class is a data type that you define to suit customized application requirements.  A class can be.
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
SE-1010 Dr. Mark L. Hornick 1 Introduction to Object-Oriented Programming (OOP) Part 1.
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.
Variables & Random Number Generation.  A penguin is playing arctic basketball. The penguin has a basketball and will push the basketball toward.
FIRST JAVA PROGRAM. JAVA PROGRAMS Every program may consist of 1 or more classes. Syntax of a class: Each class can contain 1 or more methods. public.
Using Data Within a Program Chapter 2.  Classes  Methods  Statements  Modifiers  Identifiers.
CSE 114 Computer Science I Objects Lake Superior, Michigan.
JAVA Classes Review. Definitions Class – a description of the attributes and behavior of a set of computational objects Constructor – a method that is.
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
Jens Dalsgaard Nielsen Jan Dimon Bendtsen Dept. of Electronic Systems Basic Programming INS-basis GF, PDP and HST.
Classes and Objects in Java
SE-1010 Dr. Mark L. Hornick 1 Java Programming Basics.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
CSci 162 Lecture 10 Martin van Bommel. Procedures vs Objects Procedural Programming –Centered on the procedures or actions that take place in a program.
CHAPTER 1 INTRODUCTION. CHAPTER GOALS To understand the activity of programming To learn about the architecture of computers To learn about machine code.
Objective You will be able to define the basic concepts of object-oriented programming with emphasis on objects and classes by taking notes, seeing examples,
Objects and Classes Start on Slide 30 for day 2 Java Methods A & AB Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin Much of.
Object Oriented Programming. OOP  The fundamental idea behind object-oriented programming is:  The real world consists of objects. Computer programs.
OOP Basics Classes & Methods (c) IDMS/SQL News
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
How many …?. What shape can you see? I can see some _____. Q1 Q1 stars.
Chapter 1 – Introduction
Programming what is C++
Examples of Classes & Objects
Understand the Fundamentals of Classes
Classes and OOP.
Object Oriented Concepts -I
Classes & Objects: Examples
Tonga Institute of Higher Education
Shapes.
METHODS, CLASSES, AND OBJECTS A FIRST LOOK
Introduction to Java Programming
Anatomy of a Java Program
Introductory Java Programming
Ch. 1 Vocabulary Alice.
Object-Oriented Programming and class Design
2D Shapes Rectangle Circle Triangle Rectangle. What shape is the door? Rectangle.
Presentation transcript:

Object Orientated Programming OOP

What is it?

What is this?

Any ideas?

Last Chance!

How are these two pictures different?

What can a mallard duck do?

Can all ducks do those same things?

class The class defines all the common properties of the different objects that belong to it. properties For example, there might be a class called shape that contains objects which are circles, rectangles, and triangles.

Classes continued Classes are templates used for defining new types. Classes describe both the properties and behaviors of objects. Classes themselves are not objects, but instead they are used to instantiate (i.e., create) objects in memory.

objects Generally, any item that can be individually selected and manipulated.selected This can include shapes and pictures that appear on a display screen as well as less tangible software entities.display screensoftware In object-oriented programming, for example, an object is a self-contained entity that consists of both data and procedures to manipulate the data.object-oriented programmingdata procedures

method In object-oriented programming, a procedure that is executed when an object receives a message.object-oriented programming procedureobject A method is really the same as a procedure, function, or routine in procedural programming languages.function routine The only difference is that in object- oriented programming, a method is always associated with a class.class

“Hello World” public class Hello { public static void main(String[] args) { // display a greeting in the console window System.out.println(“Hello, World!”); }

Parameter (argument) A value or expression passed in a method call. The purpose of a parameter is to pass information to a method.

“Hello World” public class Hello { public static void main(String[] args) { // display a greeting in the console window System.out.println(“Hello, World!”); }

System.out.println(“Hello, World!”); “Hello, World!” is the actual parameter or agrument of the method println.

In the first two tutorials in Alice, what actual parameters have you passed?