OOP features of Jeroo 3-Jul-19.

Slides:



Advertisements
Similar presentations
Using Jeroo Dianne Meskauskas
Advertisements

Statements and Questions By Tracie Kile 3 rd grade.
13-Jun-14 OOP features of Jeroo. Overview In this presentation we will discuss these topics: OOP terminology Jeroo syntax constructors methods.
SIMPLE PROGRAMS Jeroo – Chapter 4 –. Basic Concepts Jeroo (Java/C++/object-oriented) programing style is case-sensative. Be consistent in coding Logic.
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.
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!
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.
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.
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.
25-Oct-15 Jeroo Code. Overview In this presentation we will discuss: How to write code in Jeroo How to run a Jeroo program.
13-Nov-15 Control Structures. Overview Without control structures, everything happens in sequence, the same way every time Jeroo has two basic control.
16-Dec-15 Control Structures VB. Overview Without control structures, everything happens in sequence, the same way every time Jeroo has two basic control.
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.
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.
Andrew(amwallis) Classes!
OOP - Object Oriented Programming
Classes and Objects.
Control Structures part 2
Objects as a programming concept
Class Structure 15-Jun-18.
Some Eclipse shortcuts
Ontology From Wikipedia, the free encyclopedia
Jeroo Code 18-Jul-18.
Classes and Objects in Java
2.2 Algorithms 21-Jul-18.
Table of Contents Class Objects.
Road Map Introduction to object oriented programming. Classes
Creating Your OwnClasses
Introduction to Objects
Procedural Abstraction Object-Oriented Code
Methods The real power of an object-oriented programming language takes place when you start to manipulate objects. A method defines an action that allows.
OOP features of Jeroo 8-Nov-18.
a small object oriented programming language.
Classes In C#.
PHP Classes and Object Orientation
Using Objects 21-Nov-18.
Class Structure 28-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?
CLASSES, AND OBJECTS A FIRST LOOK
CIS16 Application Development and Programming using Visual Basic.net
Control Structures 5-Apr-19.
Overview of Java 6-Apr-19.
OOP Python Inheritance
Review of Previous Lesson
Review of Previous Lesson
CPS120: Introduction to Computer Science
Lesson 3 – Social Skill: Asking Questions.
Control Structures 12-May-19.
Ch. 1 Vocabulary Alice.
Classes and Objects in Java
2.2 Algorithms 26-Jun-19.
Indentation & Comments
Control Structures VB part 2
IF 1-Jul-19.
Classes and Methods 15-Aug-19.
Jeroo Code 7-Sep-19.
Introduction to Objects
Presentation transcript:

OOP features of Jeroo 3-Jul-19

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: What kind of data is in an object Example: a Jeroo object contains three types of information: its location, its direction, and the number of flowers in its pouch. How to make a new object of that class Example: Dim Andy as Jeroo = new Jeroo(2,5,SOUTH,3) Location = row 2, column 5 Direction = SOUTH Holding 3 flowers The default constructor creates a Jeroo at location 0,0 facing EAST with no flowers Dim Andy as Jeroo = new Jeroo() The methods of an object (the actions it can perform) Example: Andy.hop() Jeroos can hop, pick flowers, plant flowers, toss nets, and turn.

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

Sending messages to objects We don’t 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(WEST); 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