OOP and Graphics. Object Oriented Programming The ‘classic’ point of view of a programmer was that the program instructions were the active part, the.

Slides:



Advertisements
Similar presentations
Final and Abstract Classes
Advertisements

Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
An Introduction to Visual Basic Terms & Concepts.
Object Orientated Programming OOP. What is it? What is this?
OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
Windows Programming 1 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#
Introducing Programming a general discussion. What is a Program? Sets of instructions that get the computer to do something Programs may be a few lines.
Programming Basics Aims of Programming: –The aim of programming is to write programs to accomplish complex tasks Programming method: –functional decompositional.
Classes and Objects CSC 171 FALL 2004 LECTURE 2. LABS Labs start this week. Go to your 2 nd (Wed or Thurs) lab Expect something like the programming exercises.
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
1 Python Programming: An Introduction to Computer Science Chapter 3 Objects and Graphics.
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
Inductive and Deductive Reasoning Geometry 1.0 – Students demonstrate understanding by identifying and giving examples of inductive and deductive reasoning.
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!
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Object Oriented Programming
TCU CoSc Introduction to Programming (with Java) Getting to Know Java.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
Chapter 11 Introduction to Classes Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg.
BIT 1003 – Presentation 7. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Design Patterns in Java Chapter 1 Introduction Summary prepared by Kirk Scott 1.
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
Classes and Objects The basics. Object-oriented programming Python is an object-oriented programming language, which means that it provides features that.
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
Simple Classes. ADTs A specification for a real world data item –defines types and valid ranges –defines valid operations on the data. Specification is.
Definition of a Set DM is study of discrete structures. Fundamental discrete structure upon which most of other discrete structures are built is the sets.
Object-Oriented Programming. Objectives Distinguish between object-oriented and procedure-oriented design. Define the terms class and object. Distinguish.
EGR 2261 Unit 11 Classes and Data Abstraction  Read Malik, Chapter 10.  Homework #11 and Lab #11 due next week.  Quiz next week.
The Cortex-M3 Embedded Systems: Programming With the Kitronix K350QVG-V1-F LCD Refer to “Kitronix Ltd. PRODUCT SPECIFICATION” “SSD2119 Advance Information”
Introduction to OOP CPS235: Introduction.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Java Programs COMP 102 #3.
Object-Oriented Programming (OOP) What we did was: (Procedural Programming) a logical procedure that takes input data, processes it, and produces output.
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,
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Engineering Computation with MATLAB First Edition by David M. Smith Chapter.
Strings Robin Burke IT 130. Outline Objects Strings methods properties Basic methods Form validation.
Create Views Using a Graphical Designer Database Administration Fundamentals LESSON 2.3b.
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
3-July-2002cse142-D2-Methods © 2002 University of Washington1 Methods CSE 142, Summer 2002 Computer Programming 1
A Simple Object Oriented Program public class Simple { public static void main (String [] args) { System.out.println(“howdy”); } System.out is an object.
CSCI120 Introduction to Computer Science I using Python 3
Animate objects and threads
OOP - Object Oriented Programming
Visit for more Learning Resources
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
Programming Languages Dan Grossman 2013
Building Java Programs
Classes & Objects There are two main programming paradigms: Procedural Object-Oriented Up to now, everything we have done has been procedural.
Classes and OOP.
Lecture 1: Introduction to JAVA
Object Oriented Concepts -I
An Introduction to Visual Basic
Engineering Computing
Introduction to Object-oriented Program Design
Procedural Abstraction Object-Oriented Code
Object-oriented Design in Processing
Learning Objectives Classes Constructors Principles of OOP
Classes & Objects – Revisited…
Object-oriented Design in Processing
Overview of Programming Paradigms
Class 7 coordinates: pixel and with setCoords aspect ratio Rectangle
Object-oriented Design in Processing
Final and Abstract Classes
A Level Computer Science Topic 6: Introducing OOP
Ch. 1 Vocabulary Alice.
Object-oriented Design in Processing
Presentation transcript:

OOP and Graphics

Object Oriented Programming The ‘classic’ point of view of a programmer was that the program instructions were the active part, the data just sat there and was manipulated. A new paradigm became popular in the 80’s: OOP The idea is that programs should be considered as interactions of objects. An object was a structure that “knew things” (i.e. had data values) and “did things” (i.e. had operations to do on the data) (There’s quite a bit more to the paradigm than that, but that will do for now.)

Objects in Graphics The graphics library is set up as a collection of object templates Point, Circle, Rectangle, Line and so on These templates are called “classes”. They are the “pattern” for what a particular object should be. Example: a Point class would have data about the position of the point (x, y) and functions that could do things with that information You call a function called a “constructor” to make a new object from the class. Constructor methods are almost always the same name as the name of the class. (Objects are also called “instances”.)

Objects in Graphics Once you have an object constructed, it has a name. You can give the object commands by calling the methods (functions) that it knows about. Example: p = Point(200, 300) # p is now an object from class Point p.draw(win) p.move(0, 5) Note the syntax: “dot notation”. The statement or expression starts with the object name, followed by a dot, then the name of the method and its arguments, if any.