PEMROGRAMAN BERORIENTASI OBJECT. Indra Gunawan, ST., M.Kom., CEH., CHFI

Similar documents
PEMROGRAMAN BERORIENTASI OBJECT. Indra Gunawan, ST., M.Kom., CEH., CHFI

PEMROGRAMAN BERORIENTASI OBJECT. Indra Gunawan, ST., M.Kom., CEH., CHFI

Copyright 2005 Department of Computer & Information Science

INFS 214: Introduction to Computing

Programming Languages and Program Development

Object oriented programming Concepts

JAVA: A Primer. By: Amrita Rajagopal

Object-Oriented Programming Concepts

JAVASCRIPT - OBJECTS OVERVIEW

PEMROGRAMAN WEB. Indra Gunawan, ST., M.Kom., CEH., CHFI

Computer Science 4U Unit 1. Programming Concepts and Skills Modular Design

PEMROGRAMAN WEB. Indra Gunawan, ST., M.Kom., CEH., CHFI

Lecture 6 Introduction to Objects and Classes

CHAPTER 5 GENERAL OOP CONCEPTS

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

New Programming Paradigms

VB.NET. Exercise 1: Creating Your First Application in Visual Basic.NET

OOPs: The Harsh Realities of Programming

Chapter3: Introduction to Classes and Objects

What are the characteristics of Object Oriented programming language?

Concepts of Programming Languages

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction

JavaScript and XHTML. Prof. D. Krupesha, PESIT, Bangalore

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES

Objective-C: An Introduction (pt 1) Tennessee Valley Apple Developers Saturday CodeJam July 24, 2010 August 7, 2010

Chapter 5. Names, Bindings, and Scopes

Chapter 1. Introduction to Computers and Java Objects. Background information. » important regardless of programming language. Introduction to Java

Programming for Engineers in Python

STUDY NOTES UNIT 1 - INTRODUCTION TO OBJECT ORIENTED PROGRAMMING

M Introduction to Visual Basic.NET Programming with Microsoft.NET 5 Day Course

Self-test Programming Fundamentals

What is a Programming Paradigm

Chapter 1. Preliminaries

Oops known as object-oriented programming language system is the main feature of C# which further support the major features of oops including:

Inheritance. OOP components. Another Example. Is a Vs Has a. Virtual Destructor rule. Virtual Functions 4/13/2017

Sri Vidya College of Engineering & Technology


Introduction to Programming Paradigms. Prepared By: Neeraj Raheja

DOWNLOAD OR READ : VISUAL OBJECT ORIENTED PROGRAMMING USING DELPHI WITH CD ROM SIGS ADVANCES IN OBJECT TECHNOLOGY PDF EBOOK EPUB MOBI

Comprehensive AngularJS Programming (5 Days)

React. HTML code is made up of tags. In the example below, <head> is an opening tag and </head> is the matching closing tag.

JavaScript Programming

2559 : Introduction to Visual Basic.NET Programming with Microsoft.NET

Chapter 2: Java OOP I


INTRODUCTION TO JAVASCRIPT

JAVA MOCK TEST JAVA MOCK TEST II

Object-Oriented Programming (OOP) Fundamental Principles of OOP

1) What is the first step of the system development life cycle (SDLC)? A) Design B) Analysis C) Problem and Opportunity Identification D) Development

The University Of Michigan. EECS402 Lecture 06. Andrew M. Morgan. Savitch Ch. 6 Intro To OOP Classes Objects ADTs.

C++ Classes & Object Oriented Programming

Object-Oriented Programming (OOP) Basics. CSCI 161 Introduction to Programming I

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design

Elementary Concepts of Object Class

1 Epic Test Review 2 Epic Test Review 3 Epic Test Review 4. Epic Test Review 5 Epic Test Review 6 Epic Test Review 7 Epic Test Review 8

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

An Overview of Visual Basic.NET: A History and a Demonstration

Object Oriented Programming using C++

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) What is JavaScript?

Visual Basic Scripting

SEEM4570 System Design and Implementation. Lecture 11 From Design to Implementation

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Java SE7 Fundamentals

Principles of Programming Languages, 2

Object Oriented Programming with c++ Question Bank

Second-generation: Assembly language. Figure 6.1 Generations of programming languages. Assembly Language Characteristics.

Unit - IV CHAPTER - 13 INTRODUCTION TO OOP WITH C++ Part 1 Choose the best answer

classjs Documentation

C++ Important Questions with Answers

Learn Web Development CodersTrust Polska course outline. Hello CodersTrust! Unit 1. HTML Structuring the Web Prerequisites Learning pathway.

CSI33 Data Structures

Basics of Object Oriented Programming. Visit for more.

Defining Classes and Methods

Call: Core&Advanced Java Springframeworks Course Content:35-40hours Course Outline

CSC 533: Organization of Programming Languages. Spring 2005

Object Orientated Analysis and Design. Benjamin Kenwright

Chapter 6: Programming Languages

Chapter 12 Object-Oriented Programming. Starting Out with Games & Graphics in C++ Tony Gaddis

Lecturer: William W.Y. Hsu. Programming Languages

Programming Paradigms

Chapter 1 Preliminaries

Programming Languages 2nd edition Tucker and Noonan"

7. C++ Class and Object

Standard 1 The student will author web pages using the HyperText Markup Language (HTML)

Object-Oriented Programming. Objects. Objects. Objects

9.1 OO Methodology OO Design Object

Data Structures (list, dictionary, tuples, sets, strings)

Introduction to Java. March 1, 2001 CBRSS and the John M. Olin Institute for Strategic Studies Lars-Erik Cederman

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

CERTIFICATE IN WEB PROGRAMMING

9/21/2010. Based on Chapter 2 in Advanced Programming Using Visual Basic.NET by Bradley and Millspaugh

Programmazione. Prof. Marco Bertini

CS260 Intro to Java & Android 02.Java Technology

Data Structures and Programming with C++

Chapter 5: Algorithms

1. Write two major differences between Object-oriented programming and procedural programming?

(5-1) Object-Oriented Programming (OOP) and C++ Instructor - Andrew S. O Fallon CptS 122 (February 4, 2019) Washington State University

A Data Modeling Process. Determining System Requirements. Planning the Project. Specifying Relationships. Specifying Entities

Transcription:

PEMROGRAMAN BERORIENTASI OBJECT Indra Gunawan, ST., M.Kom., CEH., CHFI

RANGE NILAI 95.00-100.00 A 90.00-94.99 A- 85.00-89.99 A/B 80.00-84.99 B+ 75.00-79.99 B 70.00-74.99 B- 65.00-69.99 B/C 60.00-64.99 C+ 55.00 - -59.99 C 50.00-54.99 C- 40.00-49.99 D 0.00-39.99 E

UNSUR PENILAIAN Kehadiran Tugas Individu Tugas Kelompok Diskusi Prilaku UTS UAS 10% 15% 15% 15% 15% 15% 15%

OUTLINE MATERI 1. Object Oriented Programming Introduction. 2. Javascript Introduction. 3. Javascript Object and Class/Function. 4. Javascript Data Type. 5. Javascript Array. 6. Javascript Conditional Statement. 7. Javascript Looping. 8. Javascript Closures and Prototype. 9. Javascript Inheritance using Closure and Prototype. 10. Javascript Encapsulation using Document Object Model (DOM). 11.Javascript Polymorhpism. 12. Javascript and JSON. 13. Case Study.

REFERENSI 1. Prof Cesare Tautasso, Object-Oriented JavaScript Dynamic HTML, 2007. 2. Department of Computer & Information Science, Introducing Object- Oriented Programming (OOP), 2005. 3. JavaScript, Third Edition. 4. Stoyan Stefanov, Object-Oriented JavaScript, 2008, Yahoo! Inc, 5. Noname, Object Oriented Javascript. 6. http://w3schools.com Referensi dapat didownload di blog saya : http://digital4rainsick.wordpress.com

TUJUAN Memahami macam2 style dalam Pemrograman. Memahami konsep OOP. Memahami konsep Pembungkusan (Encapsulation), Pewarisan Keturunan (Inheritance),dan Memiliki banyak Bentuk (Polymorphism).

Programming Languages Programming languages allow programmers to code software. The three major families of languages are: Machine languages Assembly languages High-Level languages

Machine Languages Comprised of 1s and 0s The native language of a computer Difficult to program one misplaced 1 or 0 will cause the program to fail. Example of code: 1110100010101 111010101110 10111010110100 10100011110111

Assembly Languages Assembly languages are a step towards easier programming. Assembly languages are comprised of a set of elemental commands which are tied to a specific processor. Assembly language code needs to be translated to machine language before the computer processes it. Example: ADD 1001010, 1011010

High-Level Languages High-level languages represent a giant leap towards easier programming. The syntax of HL languages is similar to English. Historically, we divide HL languages into two groups: Procedural languages Object-Oriented languages (OOP)

Procedural Languages Early high-level languages are typically called procedural languages. Procedural languages are characterized by sequential sets of linear commands. The focus of such languages is on structure. Examples include C, COBOL, Fortran, LISP, Perl, HTML, VBScript

Object-Oriented Languages Most object-oriented languages are high-level languages. The focus of OOP languages is not on structure, but on modeling data. Programmers code using blueprints of data models called classes. Examples of OOP languages include C++, Visual Basic.NET and Java.

Object Oriented Programming Object Unique programming entity that has methods, has attributes and can react to events. Method Things which an object can do; the verbs of objects. In code, usually can be identified by an action word -- Hide, Show

Object Oriented Programming Attribute Things which describe an object; the adjectives of objects. In code, usually can be identified by a descriptive word Enabled, BackColor Events Forces external to an object to which that object can react. In code, usually attached to an event procedure

Object Oriented Programming Class Provides a way to create new objects based on a meta-definition of an object (Example: The automobile class) Constructors Special methods used to create new instances of a class (Example: A Honda Civic is an instance of the automobile class.)

OOP - Encapsulation Incorporation into a class of data & operations in one package Data can only be accessed through that package Information Hiding

FUNDAMENTAL CONCEPT OF OOP

OOP - Inheritance Allows programmers to create new classes based on an existing class Methods and attributes from the parent class are inherited by the newlycreated class New methods and attributes can be created in the new class, but don t affect the parent class s definition

OOP - Polymorphism Creating methods which describe the way to do some general function (Example: The drive method in the automobile class) Polymorphic methods can adapt to specific types of objects.

Classes and Objects A class is a data type that allows programmers to create objects. A class provides a definition for an object, describing an object s attributes (data) and methods (operations). An object is an instance of a class. With one class, you can have as many objects as required. This is analogous to a variable and a data type, the class is the data type and the object is the variable.

Sample Class Defintion Class Cube Side As Real Volume As Real Subprogram SetSide(New Side) Set Side = New Side End Subprogram Subprogram ComputeVolume() Set Volume = Side ^ 3 End Subprogram Function GetVolume() As Real Set GetVolume = Volume End Function Function GetSide() As Real Set GetSide = Side End Function End Class The class Cube is similar to the definition of a record, but also has functions added that are part of the objects created. So we can think of it as an object has data attributes and function attributes

Sample Instance of Class Main Program Declare Cube1 As Cube Write Enter a positive number: Input Side1 Call Cube1.SetSide(Side1) Call Cube1.ComputeVolume Write The volume of a cube of side, Cube1.GetSide Write is, Cube1.GetVolume End Program

Is JavaScript an OOP language? Well, not really We call JavaScript an "object-inspired" language It uses objects by way of supporting inheritance and encapsulation, but it doesn't really provide support for polymorphism.

Object-Oriented JavaScript More like Object-Inspired JavaScript We can create new, custom, re-usable objects in JavaScript that include their own methods, properties and events. Consider the following problem: I want to record the color, brand, horsepower and price of several cars.

EXAMPLE Kelas Tombol, mempunyai properti : { warna = hijau, lebar = 30px, function tampilkanpesan() { alert( Awas! ) } } Mempunyai method (melakukan pekerjaan) = tampilkanpesan Mempunyai event (dikenai pekerjaan) = onclick, onload Membuat Object anak Var TombolBaru = new Tombol() Cetak ke layar document.write(mejabaru.warna) //Hasilnya hijau

EXAMPLE