Introduction to Java and OOP. Hendrik Speleers

Similar documents
Introduction to Java Programming

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Introduction to Java Programming CPIT 202. WEWwwbvxnvbxmnhsgfkdjfcn

1. Introduction. Java. Fall 2009 Instructor: Dr. Masoud Yaghini

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

CHAPTER 1. Introduction to JAVA Programming

Lecture 1: Introduction to Java

The object-oriented approach goes a step further by providing tools for the programmer to represent elements in the problem space.

History Introduction to Java Characteristics of Java Data types

Chapter 1 Introduction to Java

DAY 3 J2ME Aalborg University, Mobile Device Group. Mobile. Mobile Phone Programming

Introduction to JAVA Programming Language

JAVA: A Primer. By: Amrita Rajagopal

CS260 Intro to Java & Android 02.Java Technology

Advanced Database Applications. Object Oriented Database Management Chapter 13 10/29/2016. Object DBMSs

Certified Core Java Developer VS-1036

Object Oriented Programming

JVM interprets the Java bytecode, controls how it interacts with the operating system and manages memory.

Object Oriented Programming. Michał Bereta

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION

Supported Operating Environment. Java Support

Java Puzzle Ball Nick Ristuccia

Chapter 1 Introduction to Computers, Programs, and Java

CMPT Data and Program Organization

Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

Java Training For Six Weeks

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Mobile Computing LECTURE # 2

Introduction to Object-Oriented Programming

Object Oriented Concepts and Programming (CSC244) By Dr. Tabbasum Naz

Programming with Java

Reusing Classes. Hendrik Speleers

Service-Oriented Programming

Appendix A - Glossary(of OO software term s)

Introduction to Java. Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved.

MODULE 1 JAVA PLATFORMS. Identifying Java Technology Product Groups

CSE 421 Course Overview and Introduction to Java

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

Core Java Syllabus. Overview

MEAP Edition Manning Early Access Program Get Programming with Java Version 1

TABLE OF CONTENTS...2 INTRODUCTION...3 WHAT IS JAVA?...3 EVOLUTION OF JAVA...3

Introduction to Computers and Java

An Introduction to Software Engineering. David Greenstein Monta Vista High School

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

Short Questions. Instructor: Created by: Visit: 2/2/2018 OOP with JAVA. Muhammad Naveed

Java Basics. Object Orientated Programming in Java. Benjamin Kenwright

Eng. Mohammed S. Abdualal

Introduction. Introduction to OOP with Java. Lecture 01: Introduction to OOP with Java - AKF Sep AbuKhleiF -

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

CS5015 Object-oriented Software Development. Lecture: Overview of Java Platform. A. O Riordan, 2010 Most recent revision, 2014 updated for Java 8

Java Programming Language Mr.Rungrote Phonkam

Introduction to OOP with Java. Instructor: AbuKhleif, Mohammad Noor Sep 2017

ABOUT CORE JAVA COURSE SCOPE:

AN ISO 9001:2008 CERTIFIED COMPANY ADVANCED. Java TRAINING.

JVA-103. Java Programming

SYLLABUS JAVA COURSE DETAILS. DURATION: 60 Hours. With Live Hands-on Sessions J P I N F O T E C H

104. Intermediate Java Programming

generate-jvm-report shows the threads, classes, memory, and loggers for a given target instance. Name Synopsis

Core JAVA Training Syllabus FEE: RS. 8000/-

Java Language. Programs. Computer programs, known as software, are instructions to the computer. You tell a computer what to do through programs.

Chapter 1 Introduction to Computers, Programs, and Java

OBJECT ORIENTED PROGRAMMING

Lecture 1: Overview of Java

Introduction to Visual Basic and Visual C++ Introduction to Java. JDK Editions. Overview. Lesson 13. Overview

JAVA METHODS OBJECT ORIENTED PROGRAMMING AND DATA STRUCTURES

Quizz Master AISL year wednesday 26 october 2016

BASIC CONCEPT OF OOP

C O M P U T A T I O N A L P H Y S I C S

Index. Course Outline. Grading Policy. Lab Time Distribution. Important Instructions

[Course Overview] After completing this module you are ready to: Develop Desktop applications, Networking & Multi-threaded programs in java.

From High Level to Machine Code. Compilation Overview. Computer Programs

Selected Java Topics

Introduction to OOP Using Java Pearson Education, Inc. All rights reserved.

Outline. Introduction to Java. What Is Java? History. Java 2 Platform. Java 2 Platform Standard Edition. Introduction Java 2 Platform

1: Introduction to Object (1)

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

Introduction to Computers and Java

Chapter 1: Introduction to Computers, Programs, and Java

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

NOOTAN PADIA ASSIST. PROF. MEFGI, RAJKOT.

II. Compiling and launching from Command-Line, IDE A simple JAVA program

Introduction to Computers and Java

Java Programming Manual Windows

2 Introduction to Java. Introduction to Programming 1 1

generate-jvm-report shows the threads, classes, memory, and loggers for a given target instance. Name Synopsis

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

Compaq Interview Questions And Answers

JAVA MOCK TEST JAVA MOCK TEST III

INHERITANCE & POLYMORPHISM. INTRODUCTION IB DP Computer science Standard Level ICS3U. INTRODUCTION IB DP Computer science Standard Level ICS3U

Chapter 1 Introduction to Computers, Programs, and Java

Advanced Object-Oriented Programming Introduction to OOP and Java

WA1278 Introduction to Java Using Eclipse

C++ Programming: Introduction to C++ and OOP (Object Oriented Programming)

Tutorial 1 CSC 201. Java Programming Concepts عؾادئماظربجمةمبادؿكدامماجلاصا

Java Training JAVA. Introduction of Java

Object oriented programming Concepts

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

IT151: Introduction to Programming (java)

The Sun s Java Certification and its Possible Role in the Joint Teaching Material

Transcription:

Introduction to Java and OOP Hendrik Speleers

Introduction to Java Additional course material Thinking in JAVA (4th edition) by Bruce Eckel Free download of older editions: http://mindview.net/books/tij4 Java programming Java Development Kit (JDK) from Oracle Includes Java Runtime Environment (JRE) to run Java programs Includes tools for Java development Free download: http://www.oracle.com/technetwork/java/javase Java Integrated Development Environment (IDE) Eclipse: very powerful and user friendly IDE Free download: https://eclipse.org/ide/

Introduction to Java Programming Part of the software development process Problem definition and analysis Design Programming (code (code// test test /debug) TARGET Abstraction: problem space vs. solution space

Introduction to Java Programming languages: level of abstraction Low-level programming language Easy conversion to machine code Relatively non-portable High-level programming language Higher abstraction: in need of compiler More readable, more portable Structured: Pascal, C, Solution space (machine) Problem space (what do you want?) abstraction: move away from machine simplify problem description Object-oriented: C++, Java Describe problem in terms of problem elements: OBJECTS

Introduction to Java Java Developed at Sun Microsystems (now Oracle) First intended for programs in small devices Based on C and C++ Two types of Java programs: applications applets Platform independent: highly portable Java code (*.java) is compiled to byte code (*.class) Java s logo and mascot (Duke) Byte code is executed in Java Virtual Machine (JVM) More user-friendly language than C/C++ Memory management: garbage collector

Introduction to Java Java Version history JDK 1.0 1996 JDK 1.1 1997 J2SE 1.2 1998 J2SE 1.3 2000 J2SE 1.4 2002 J2SE 5.0 2004 Java SE 6 2006 Java SE 7 2011 Java SE 8 2014 Java SE 9 2017 Java s logo and mascot (Duke) young and very active language

Introduction to Java Java Java in numbers (according to Oracle) 95% of enterprise desktops run Java 1 billion Java downloads each year 9 million developers worldwide #1 programming language... Java s logo and mascot (Duke)

Objects and Classes Alan Kay's 5 rules for Object-Oriented Programming (OOP) Everything is an object An object is a fancy variable (storing data) + can perform operations A program is a bunch of communicating objects Objects are communicating by sending messages Each object has its own memory made up of other objects Hiding complexity behind simplicity of objects (=composition) Alan Kay, inventor of Smalltalk Every object has a type (= it is an instance of a class) All objects of same type can receive same messages Families of types can be under a base type (=inheritance)

Objects and Classes Programming with objects: the interface Class name Interface Light switch() brighten() dim() Class diagram according to UML standard (Unified Modeling Language) Light (1) Object Light light1 = new Light(); Message light1.switch(); Light (2)

Objects and Classes Programming with objects: the interface Class name Data status Light Class diagram according to UML standard (Unified Modeling Language) Interface switch()... Object Light light1 = new Light(); Message light1.switch(); Light (1) Light (2)

Objects and Classes Reusing the implementation Good design: reuse of classes, once created and tested Simplest way: creating member objects of a class Composing a new class from existing classes Composition is as a has-a relationship Car Engine Class diagram Wheel

Objects and Classes CoolingSystem cool() off() Reusing the interface Inheritance: derive functionality from a parent class An is-a relationship: override parent class functions An is-like-a relationship: override + add new functions AirConditioner cool() HeatPump cool() heat() Polymorphism Code assumes parent class, but not specific child class (upcasting) Add new child classes without effort Method call determined at run-time