13-Jun-14 OOP features of Jeroo. Overview In this presentation we will discuss these topics: OOP terminology Jeroo syntax constructors methods.

Slides:



Advertisements
Similar presentations
Using Jeroo Dianne Meskauskas
Advertisements

Statements and Questions By Tracie Kile 3 rd grade.
Basic Object-Oriented concepts. Concept: An object has behaviors In old style programming, you had: –data, which was completely passive –functions, which.
CS0007: Introduction to Computer Programming Introduction to Classes and Objects.
11-May-15 Control Structures part 2. Overview Control structures cause the program to repeat a section of code or choose between different sections of.
SIMPLE PROGRAMS Jeroo – Chapter 4 –. Basic Concepts Jeroo (Java/C++/object-oriented) programing style is case-sensative. Be consistent in coding Logic.
OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
10-Jun-15 Using Objects. 2 Overview In this presentation we will discuss: Classes and objects Methods for objects Printing results.
Using Objects. Overview In this presentation we will discuss: –Classes and objects –Methods for objects –Printing results.
Evan Korth New York University Computer Science I Classes and Objects Professor: Evan Korth New York University.
Classes and Objects in Java
25-Jun-15 Starting Classes and Methods. Objects have behaviors In old style programming, you had: data, which was completely passive functions, which.
S A B D C T = 0 S gets message from above and sends messages to A, C and D S.
28-Jun-15 Using Objects. 2 Overview In this presentation we will discuss: Classes and objects Methods for objects Printing results.
29-Jun-15 Using Objects. 2 Classes and objects The type of an object is the class that describes that object If we say int count, the type of count is.
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!
State,identity and behavior of objects Sem III K.I.R.A.S.
10-Aug-15 Classes and Objects in Java. 2 Classes and Objects A Java program consists of one or more classes A class is an abstract description of objects.
PHP Workshop ‹#› PHP Classes and Object Orientation.
30-Aug-15 Using Jeroo. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works. Your first assignments.
Object Oriented Software Development
Using Jeroo To Teach Object-Oriented Concepts By Christian Digout.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
17-Sep-15 Using Jeroo. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works. Your first assignments.
College Board A.P. Computer Science A Topics Program Design - Read and understand a problem's description, purpose, and goals; Apply data abstraction.
5-Oct-15 Introduction and Code. Overview In this presentation we will discuss: What is Jeroo? Where can you get it? The story and syntax of Jeroo How.
16-Oct-15 Loops in Methods And compound conditions.
ClassesPHPMay-2007 : [‹#›] PHP Classes and Object Orientation.
25-Oct-15 Jeroo Code. Overview In this presentation we will discuss: How to write code in Jeroo How to run a Jeroo program.
Advanced Object- Oriented Programming Programming Right from the Start with Visual Basic.NET 1/e 14.
13-Nov-15 Control Structures. Overview Without control structures, everything happens in sequence, the same way every time Jeroo has two basic control.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 4 Defining Your Own Classes.
16-Dec-15 Control Structures VB. Overview Without control structures, everything happens in sequence, the same way every time Jeroo has two basic control.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 27 I Love this Class.
17-Feb-16 Methods. Overview In this presentation we will discuss these 4 topics: Main method vs. Jeroo methods Choosing behaviors to turn into methods.
Basic Object-Oriented concepts. Concept: Classes describe objects Every object belongs to (is an instance of) a class An object may have fields –The class.
OOP Basics Classes & Methods (c) IDMS/SQL News
11-Jun-16 Algorithms 2.2. Overview In this presentation we will discuss: What is an algorithm? 5 steps in developing an algorithm A Jeroo example.
Introduction to Jeroo a small object oriented programming language.
Methods 9-Mar-17.
OOP - Object Oriented Programming
Objects as a programming concept
Class Structure 15-Jun-18.
Some Eclipse shortcuts
Jeroo Code 18-Jul-18.
2.2 Algorithms 21-Jul-18.
Road Map Introduction to object oriented programming. Classes
Introduction to Objects
OOP features of Jeroo 8-Nov-18.
a small object oriented programming language.
PHP Classes and Object Orientation
Using Objects 21-Nov-18.
Vocabulary Review Topic.
Classes and Objects in Java
Introduction and Code 18-Jan-19.
Overview Introduction to Jeroo: What is Jeroo? Where did it come from?
Which best describes the relationship between classes and objects?
Control Structures 5-Apr-19.
OOP Python Inheritance
CPS120: Introduction to Computer Science
Ch. 1 Vocabulary Alice.
Classes and Objects in Java
2.2 Algorithms 26-Jun-19.
OOP features of Jeroo 3-Jul-19.
Indentation & Comments
IF 1-Jul-19.
Classes and Methods 15-Aug-19.
Jeroo Code 7-Sep-19.
Introduction to Objects
Presentation transcript:

13-Jun-14 OOP features of Jeroo

Overview In this presentation we will discuss these topics: OOP terminology Jeroo syntax constructors methods

OOP syntax Object oriented programming defines objects Each Jeroo you create is an object. an object has properties For example: a Jeroo has a location number of flowers in its pouch a direction it is facing an object has methods (things it can do) a Jeroo can hop, pick, plant and toss. these properties must be set to an initial value when the Jeroo is created, and change as the Jeroo acts.

Classes = definitions of objects When you create a new object it is constructed. An object may be constructed a number of different ways. this is the default constructor

Classes A class describes 3 things: 1. What kind of data is in an object Example: a Jeroo object contains three types of information: 1. its location, 2. its direction, 3. and the number of flowers in its pouch. 2. How to make a new object of that class Example: Jeroo andy = new Jeroo(2,5,SOUTH,3); 1. Location = row 2, column 5 2. Direction = SOUTH 3. Holding 3 flowers The default constructor creates a Jeroo at location 0,0 facing EAST with no flowers Jeroo andy = new Jeroo(); 3. The methods of an object (the actions it can perform) Example: andy.hop(); Jeroos can hop, pick flowers, plant flowers, toss flowers into nets, give flower to another Jeroo, and turn.

Syntax is important! A class is the type of an object Each object that is created is named Jeroo andy = new Jeroo(2,5,SOUTH,3); andy is an object Jeroo is the class

Sending messages to objects We dont perform operations on objects, we talk to them This is called sending a message to the object A message looks like this: object. method ( extra information ); The object is the thing we are talking to The method is a name of the action we want the object to take The extra information is anything required by the method in order to do its job (also called a parameter) Examples: andy.turn(RIGHT); susanna.toss(); no extra information needed

Messages and methods Messages can be used to: Give an object some information Tell an object to do something Ask an object for information (usually about itself) Any and all combinations of the above A method is something inside the object that responds to your messages A message contains commands to do something

Using OOP syntax Rewrite the following English statements as object oriented messages Tell the woman named clarissa to walk 2 steps clarissa.walk(2); Tell the Jeroo named alan to turn to the right alan.turn(RIGHT);

Vocabulary Review class: the type, or description, of an object Jeroo classes are descriptions of: island, water, flower, net, jeroo constructor: a way to create an object. comes as part of the class definition. object: an instance, or member, of a class You can only create Jeroos in your code, all other objects must be created visually. message: something that you say to an object, either telling it something or asking it for information parameter: information sent to a method

The End