Using Jeroo To Teach Object-Oriented Concepts By Christian Digout.

Slides:



Advertisements
Similar presentations
Using Jeroo Dianne Meskauskas
Advertisements

Final and Abstract Classes
C++ Classes & Data Abstraction
1 Chapter 6: Extending classes and Inheritance. 2 Basics of Inheritance One of the basic objectives of Inheritance is code reuse If you want to extend.
Inheritance Java permits you to use your user defined classes to create programs using inheritance.
Objectives Introduction to Inheritance and Composition (Subclasses and SuperClasses) Overriding (and extending), and inheriting methods and constructors.
Object-Oriented PHP (1)
16/22/2015 2:54 PM6/22/2015 2:54 PM6/22/2015 2:54 PMObject-Oriented Development Concept originated with simulating objects and their interactions. Adapted.
UML Class Diagram: class Rectangle
Chapter 10 Classes Continued
1 Chapter 8 Objects and Classes. 2 Motivations After learning the preceding chapters, you are capable of solving many programming problems using selections,
(c) University of Washington03-1 CSC 143 Java Inheritance Reading: Ch. 10.
CS 2511 Fall UML Diagram Types  2 Main Types Structure Diagrams ○ Class Diagrams ○ Component Diagrams ○ Object Diagrams Behavior Diagrams ○
Object Oriented Programming: Inheritance Chapter 9.
Chapter 6 Class Inheritance F Superclasses and Subclasses F Keywords: super F Overriding methods F The Object Class F Modifiers: protected, final and abstract.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
Chapter 11 Inheritance and Composition. Chapter Objectives Learn about inheritance Learn about subclasses and superclasses Explore how to override the.
1 Java Inheritance. 2 Inheritance On the surface, inheritance is a code re-use issue. –we can extend code that is already written in a manageable manner.
Object Oriented Programming: Java Edition By: Samuel Robinson.
25-Oct-15 Jeroo Code. Overview In this presentation we will discuss: How to write code in Jeroo How to run a Jeroo program.
Inheritance - Polymorphism ITI 1121 Nour El Kadri.
RIT Computer Science Dept. Goals l Inheritance l Modifiers: private, public, protected l Polymorphism.
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
Inheritance Chapter 10 Programs built from objects/instances of classes An O.O. approach – build on earlier work. Use classes in library and ones you have.
Peyman Dodangeh Sharif University of Technology Fall 2014.
© 2007 Lawrenceville Press Slide 1 Chapter 8 Objects  A variable of a data type that is a class. Also called an instance of a class.  Stores data  Can.
Object Oriented Programming
Chapter 7: Class Inheritance F Superclasses and Subclasses F Keywords: super and this F Overriding methods F The Object Class F Modifiers: protected, final.
Inheritance CSI 1101 Nour El Kadri. OOP  We have seen that object-oriented programming (OOP) helps organizing and maintaining large software systems.
© 2007 Lawrenceville Press Slide 1 Chapter 9 Inheritance  One class is an extension of another.  Allows a class to define a specialized type of an existing.
Object Oriented Programming. OOP  The fundamental idea behind object-oriented programming is:  The real world consists of objects. Computer programs.
1 Interfaces and Abstract Classes The ability to define the behavior of an object without specifying that behavior is to be implemented Interface class.
Interfaces, Abstract Classes, and Polymorphism. What Is an Interface? An interface is the set of public methods in a class Java provides the syntax for.
Java Programming, Second Edition Chapter Three Using Methods, Classes, and Objects.
1 C++ Classes & Object Oriented Programming Overview & Terminology.
CS 116 Object Oriented Programming II Acknowledgement: Contains materials provided by George Koutsogiannakis and Matt Bauer.
 The word static is used to declare either a ________ variable or method.  Why do we use statics?  What is Polymorphism? class In general, we use a.
Object Oriented Programming: Inheritance Chapter 9.
Inheritance a subclass extends the functionality of a superclass a subclass inherits all the functionality of a superclass don't reinvent the wheel – "stand.
1 More About Derived Classes and Inheritance Chapter 9.
Modern Programming Tools And Techniques-I
Object-Oriented Programming Concepts
Inheritance ITI1121 Nour El Kadri.
One class is an extension of another.
Interface.
Jeroo Code 18-Jul-18.
Week 4 Object-Oriented Programming (1): Inheritance
UML Class Diagram: class Rectangle
Inheritance "Question: What is the object oriented way of getting rich? Answer: Inheritance.“ “Inheritance is new code that reuses old code. Polymorphism.
Can perform actions and provide communication
One class is an extension of another.
Abstract classes and interfaces
Can perform actions and provide communication
MSIS 670 Object-Oriented Software Engineering
Week 6 Object-Oriented Programming (2): Polymorphism
Interfaces.
Advanced Programming Behnam Hatami Fall 2017.
Object Oriented Programming: Inheritance
Advanced Java Programming
Object Oriented Programming
Can perform actions and provide communication
Inheritance Inheritance is a fundamental Object Oriented concept
Java Programming, Second Edition
Java Inheritance.
Abstract classes and interfaces
Final and Abstract Classes
Chapter 11 Inheritance and Encapsulation and Polymorphism
Computer Science II for Majors
INTERFACES Explained By: Sarbjit Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Presentation transcript:

Using Jeroo To Teach Object-Oriented Concepts By Christian Digout

What is Jeroo? A tool for helping students learn object- oriented concepts including: ◦ Instantiating and using objects ◦ Constructors ◦ Writing methods to extend behavior ◦ Information Hiding

Jeroo Layout

Example of a Program

Features of the Jeroo Application Animation showing Jeroos moving around the island Source code highlighting synchronized with execution Stepwise or continuous execution mode Choice of execution speeds Ability to switch between execution modes and change speeds at will Error messages

Summary of Jeroo Small Object-Oriented Language Only one class, the Jeroo class Can instantiate up to four Jeroos Three attributes per Jeroo ◦ location ◦ direction ◦ number of flowers

Summary of Jeroo Six constructors to initialize the attributes Seven action methods Seven sensor methods to examine the immediate surroundings Four relative directions

Instantiation The process of creating an instance of an object. Jeroo has 6 constructors ◦ Including a default constructor The new operator is used to instantiate objects

Constructors

Objects and Jeroo States (or member variables) Position (x, y) Direction (North, East, South, West) Number of flowers Information Hiding ◦ A Jeroo’s data is protected ◦ Protects data integrity ◦ Need to use member methods to access member variables

Behavior and Member Methods

Behaviors and Member Members

Student Assignments From the Jeroo website: ◦ Pick All Flowers ◦ The Maze ◦ Walk the Lake ◦

Jeroo Use of constructors Get use to the dot-notation Use member methods Can extend the Jeroo class with new methods

Java – Building a Class public class Circle { private static final double PI = 3.14; private double radius; public Circle() { radius = 1; } public void setRadius(double newRadius) { radius = newRadius; } }

Jeroo Class It is written in Java Ask students what would it include? ◦ 6 constructors ◦ Member variables ◦ Member methods

Turtle Graphics Downloaded from: wadsworth/course_products_wp.pl?fid=M 20bI&product_isbn_issn= wadsworth/course_products_wp.pl?fid=M 20bI&product_isbn_issn= Part of textbook resources for: ◦ Fundamentals of Java by Lambert/Osbourne Allows students to create simple graphics using Java

Turtle Graphics Good for showing: ◦ Composition “has a” relationships ◦ Inheritance “is a” relationships ◦ Interfaces ◦ Abstract classes

Turtle Graphics Create a Shape Interface AbstractShape can implement Shape ◦ Can implement members that would be the same for all shapes such as:  X and Y coordinates  Move function ◦ Abstract methods would be:  Area  Draw

Shape Hierarchy Can implement Circle and Rectangle Classes with students. ◦ Extend Abstract Shape Assignment: ◦ Students implement a Triangle Class ◦ Students can add a Perimeter Method to the hierarchy