Object Oriented Programming Criteria: P2 Date: 07/10/15 Name: Thomas Jazwinski.

Slides:



Advertisements
Similar presentations
P5, M1, D1.
Advertisements

1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
20-Jun-15 Eclipse. Most slides from: 2 About IDEs An IDE is an Integrated Development Environment.
CIS 234: Integrated Development Environments Dr. Ralph D. Westfall May, 2007.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 13: Object-Oriented Programming
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Functions A function is a snippet of code that performs a specific task or tasks. You use a multitude of functions daily when you do such things as store.
Java Course Outline Kumar Harshit, USW. Course Description Teaches students to program using the Java programming language with the help of the Netbeans.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
A First Program Using C#
Microsoft Visual Basic 2005: Reloaded Second Edition
An Object-Oriented Approach to Programming Logic and Design
Integrated Development Environments (IDEs) CS 21a: Introduction to Computing I First Semester,
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
© The McGraw-Hill Companies, 2006 Chapter 4 Implementing methods.
CSC 142 B 1 CSC 142 Java objects: a first view [Reading: chapters 1 & 2]
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
08/10/ Iteration Loops For … To … Next. 208/10/2015 Learning Objectives Define a program loop. State when a loop will end. State when the For.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 7 PL/SQL Packages.
Chapter 6: User-Defined Functions
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
IDEs Department of Information Systems and Computer Science Ateneo de Manila University.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 6 Using Methods.
Eclipse Eclipse An IDE is an Integrated Development Environment Different IDEs meet different needs – BlueJ, DrJava are designed as teaching.
Working With Objects Tonga Institute of Higher Education.
1 Chapter Nine Using GUI Objects and the Visual Studio IDE.
Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 1 Simple Data Types Integer: An integer.
Built-In and user-Defined functions Software Design Concepts Lecture IV Dr. Sothy Vignarajah.
Eclipse 24-Apr-17.
I Power Higher Computing Software Development Development Languages and Environments.
Procedural Programming Criteria: P2 Task: 1.2 Thomas Jazwinski.
Sanjay Johal. Introduction(1.1) In this PowerPoint I will be explaining :  The purpose of the code for each of the two given programs, e.g. to carry.
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
Eclipse. An IDE is an Integrated Development Environment Different IDEs meet different needs BlueJ, DrJava are designed as teaching tools Emphasis is.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
Working With Objects Tonga Institute of Higher Education.
Lecture 10: Modular Programming (functions) B Burlingame 13 April 2015.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Copyright © 2004 – 2013 Curt Hill Java Debugging In Eclipse.
2.1 Functions. Functions in Mathematics f x y z f (x, y, z) Domain Range.
Chapter 3 Functions. 2 Overview u 3.2 Using C++ functions  Passing arguments  Header files & libraries u Writing C++ functions  Prototype  Definition.
Functions Math library functions Function definition Function invocation Argument passing Scope of an variable Programming 1 DCT 1033.
Unit 10-JavaScript Functions Instructor: Brent Presley.
Integrated Development Environments (IDEs) CS 21a: Introduction to Computing I Department of Information Systems and Computer Science Ateneo de Manila.
Functions in C++ Top Down Design with Functions. Top-down Design Big picture first broken down into smaller pieces.
Object and Classes อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 3.
Eclipse 27-Apr-17.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Chapter 1: Introduction to Computers and Programming.
Chapter 1 Object Orientation: Objects and Classes.
Oracle9i Developer: PL/SQL Programming Chapter 6 PL/SQL Packages.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
The Object-Oriented Thought Process Chapter 03
Introduction to Object-oriented Programming
Functions + Overloading + Scope
Objects as a programming concept
Learning to Program D is for Digital.
User-Defined Functions
Eclipse 20-Sep-18.
Chapter 6 Methods: A Deeper Look
Unit 1: Introduction Lesson 1: PArts of a java program
CS285 Introduction - Visual Basic
How to stop Fortran programming problems at the source
Functions Imran Rashid CTO at ManiWeber Technologies.
Methods Scope How are names handled?
Presentation transcript:

Object Oriented Programming Criteria: P2 Date: 07/10/15 Name: Thomas Jazwinski

Tools – Predefined Methods P2 Predefined methods are methods that have already been written by a developer of the programming language and can be used by anyone as many times as they like. These predefined functions are found in the library of that programming language. The library of the Java programming language is slightly more complicated as it has classes inside the library which has the predefined function in there.

Tools – Predefined Methods This shows an example of where I have used a predefined method in object oriented program I created. This predefined functions calculate the square root of a number and as you can see from the second screenshot, it is taken from the java.lang.Math class in the java library P2

Tools – Screen Design When using object-oriented programming you can create screen designs by using tools which are objects of the program. For example using Visual C# you can drag and drop tools onto a form to design the way you would like it to look. These tools include buttons, text boxes, check boxes ect. P2

Using Integrated Development Environment’s An integrated development environment (IDE) is a piece of software that helps a programmer to produce a program. It does this by helping the programmer in many ways to make writing code much easier. Examples of IDE’s which support object oriented programming is Code Blocks, Eclipse and BlueJ. All of these IDE’s help the user to create a program in various different ways but also have similar features for example a compiler to compile the code so it can be executed, and a debugger which identifies any bugs or errors in a program. It also helps with colour coding different parts of the code and most IDE’s also have some code completion which finishes the names of variables and methods so that you don’t have to type the whole thing. P2

Eclipse and Code Blocks have a similar interface as they both show only the source code for the program. BlueJ is slightly better for getting used to object oriented programming as it shows the classes and the objects in a much easier way to understand. It also shows the methods that are available to be called by that function. This shows and example a program I have written using the Blue J IDE: Using Integrated Development Environment’s Classes Objects Methods P2

Global Variables Global variables in object oriented programming are variables that have a global scope. This means that they can be used in any method within a class and the value stored in the variable can be changed any time it is used. An example of a global variable I have used is shown on the right. As you can see, the ‘totalNum’ variable is declared outside of the methods and is used in multiple different methods within the program. P2

Local Variables Local variables are variables which are declared within a method and only have a local scope. This means that the variable can only be used within the method in which it was declared unlike a global variable which can be used by any method. The screenshot on the right shows an example of where I have used a local variable called ‘venueFull’ in a program I created: P2

Static Variables A static variable is the same as a class variable that is declared in the class and its value is shared with every instance object made from that class and is declared using the word ‘static’. As you can see below I have created a static variable in my clicker program which increments every time a new clicker object is created. You can see that the class has had 3 clicker objects created from it. P2

Method Overloading Method overloading is an object oriented programing feature which allows a class to have more than one method with the same name. This can only be done if the arguments for the methods are different for example if they have parameters with different data types or a different number of parameters As you can see in the example I have created below, the methods have the same name but it is not a problem as they have a different number of parameters P2

Instance In object oriented programming, an object is an instance of a class. This means that all of the objects in a class are different instances of the same class which is used like the blue prints for an object. An example of this is shown below there are 2 clicker objects from the same class, but they are separate because they are 2 different instances of the clicker class as you can see as they have different values inside them. P2

Example of Object Oriented Program This is the full Clicker program which I created using Blue J IDE which I have used as examples throughout the powerpoint:

Example of Object Oriented Program