Object Oriented Programming. Budditha Hettige Department of Computer Science

Size: px
Start display at page:

Download "Object Oriented Programming. Budditha Hettige Department of Computer Science"

Transcription

1 Object Oriented Programming Budditha Hettige Department of Computer Science

2 Overview Introduction to OOP Class and Objects Constructors Encapsulation Composition Inheritance Polymorphism Interfaces Packages Exception handling File Handling GUI Programming OOP Software development 7/11/2015 Budditha Hettige 2

3 Introduction (OOP) OOP is a programming paradigm that represents concepts as "objects" that have data fields (attributes that describe the object) and associated procedures known as methods 3

4 Advantages of OOP Provides a clear modular structure for programs OOP makes it easy to maintain and modify existing code (new objects can be created with small differences to existing ones) OOP provides a good framework for code libraries Software components can be easily adapted and modified by the programmer. 4

5 Modular Structure School 5

6 Exercise Identify suitable state and behaviors (Attributes and methods) for the following Student Bank Account Book Employee Sales Summary Course Result 7/11/2015 Budditha Hettige 6

7 Concepts of OOP Objects Classes Encapsulation Inheritance Polymorphism Data Abstraction 7

8 What is an Objects? Object is a software bundle of related state and behavior Characteristics: state and behavior 8

9 What is a class? A Java class is a group of Java methods and variables Object is an instance of a class Example class Person { // Methods // Variables } 9

10 Example Create a Java Class Account with suitable methods and variables 7/11/2015 Budditha Hettige (budditha@yahoo.com) 10

11 Class Modifiers Public Abstract Final Default (none) 11

12 Class Modifiers public: anyone can create an object of the defined class. only one public class per file, must have same name as the file (this is how Java finds it!). default: is non-public (if you don't specify "public"). Java Programming: OOP 12

13 Class Modifiers abstract: modifier means that the class can be used as a superclass only. no objects of this class can be created. final: if its definition is complete and no subclasses are desired or required a final class never has any subclasses, the methods of a final class are never overridden Java Programming: OOP 13

14 Field Modifiers public protected private none or package or default Static Final 14

15 Field Modifiers public: any method (in any class) can access the field. protected: any method in the same package can access the field, or any derived class. private: only methods in the class can access the field. Default: is that only methods in the same package can access the field. Java Programming: OOP 15

16 Field Modifiers Static: Fields declared static are called class fields (class variables). others are called instance fields. There is only one copy of a static field, no matter how many objects are created. Final:class and instance variables (static and nonstatic fields) may be declared final. The keyword final means: once the value is set, it can never be changed static final int BUFSIZE=100; final double PI= ; Java Programming: OOP 16

17 Method Modifiers public protected none or package or default private final abstract static native synchronized 17

18 Method Modifiers private/protected/public: same idea as with fields. abstract: no implementation given, must be supplied by subclass. the class itself must also be declared abstract Java Programming: OOP 18

19 Method Modifiers static: the method is a class method, it doesn't depend on any instance fields or methods, and can be called without first creating an object. final: the method cannot be changed by a subclass (no alternative implementation can be provided by a subclass). Java Programming: OOP 19

20 Method Modifiers native: the method is written in some local code (C/C++) - the implementation is not provided in Java. synchronized: only one thread at a time can call the method. Java Programming: OOP 20

21 Method Overloading You can overload methods: same method name, different parameters. you can't just change return type, the parameters need to be different. Method overloading is resolved at compile time. int CounterValue() { } return counter; Won't Work! double CounterValue() { return (double) counter; } Java Programming: OOP 21

22 All Possible Combinations of Features and Modifiers Modifier Class Variable Method public yes yes yes protected no yes yes None (default) yes yes yes private no yes yes final yes yes yes abstract yes no yes static no yes yes native no no yes transient no yes no volatile no yes no synchronized no no yes strictfp yes no yes 22

23 Example Create a class Student with following methods print(); input() Create a class Length with following methods Print() input() Add(Lenth1, Length2) 23

24 Example contd. Create a class Name with 3 attribute (First name, middle name and last name) and include following methods Print(); input() Create a class name Date with 3 attribute (Day, Month and year) and include following methods print() Input() printformat1() // PrintFormat2() // 23 rd May

Java Interview Questions and Answers

Java Interview Questions and Answers 1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java

More information

CSCI 253. Object Oriented Programming (OOP) Overview. George Blankenship 1. Object Oriented Design: Java Review OOP George Blankenship.

CSCI 253. Object Oriented Programming (OOP) Overview. George Blankenship 1. Object Oriented Design: Java Review OOP George Blankenship. CSCI 253 Object Oriented Design: Java Review OOP George Blankenship George Blankenship 1 Object Oriented Programming (OOP) OO Principles Abstraction Encapsulation Abstract Data Type (ADT) Implementation

More information

History OOP languages Year Language 1967 Simula-67 1983 Smalltalk

History OOP languages Year Language 1967 Simula-67 1983 Smalltalk History OOP languages Intro 1 Year Language reported dates vary for some languages... design Vs delievered 1957 Fortran High level programming language 1958 Lisp 1959 Cobol 1960 Algol Structured Programming

More information

Chapter 1 Fundamentals of Java Programming

Chapter 1 Fundamentals of Java Programming Chapter 1 Fundamentals of Java Programming Computers and Computer Programming Writing and Executing a Java Program Elements of a Java Program Features of Java Accessing the Classes and Class Members The

More information

Fundamentals of Java Programming

Fundamentals of Java Programming Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors

More information

CEC225 COURSE COMPACT

CEC225 COURSE COMPACT CEC225 COURSE COMPACT Course GEC 225 Applied Computer Programming II(2 Units) Compulsory Course Duration Two hours per week for 15 weeks (30 hours) Lecturer Data Name of the lecturer: Dr. Oyelami Olufemi

More information

SE 360 Advances in Software Development Object Oriented Development in Java. Polymorphism. Dr. Senem Kumova Metin

SE 360 Advances in Software Development Object Oriented Development in Java. Polymorphism. Dr. Senem Kumova Metin SE 360 Advances in Software Development Object Oriented Development in Java Polymorphism Dr. Senem Kumova Metin Modified lecture notes of Dr. Hüseyin Akcan Inheritance Object oriented programming languages

More information

Java (12 Weeks) Introduction to Java Programming Language

Java (12 Weeks) Introduction to Java Programming Language Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short

More information

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

KITES TECHNOLOGY COURSE MODULE (C, C++, DS) KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL

More information

Android Application Development Course Program

Android Application Development Course Program Android Application Development Course Program Part I Introduction to Programming 1. Introduction to programming. Compilers, interpreters, virtual machines. Primitive data types, variables, basic operators,

More information

PHP Object Oriented Classes and objects

PHP Object Oriented Classes and objects Web Development II Department of Software and Computing Systems PHP Object Oriented Classes and objects Sergio Luján Mora Jaume Aragonés Ferrero Department of Software and Computing Systems DLSI - Universidad

More information

How To Design Software

How To Design Software The Software Development Life Cycle: An Overview Presented by Maxwell Drew and Dan Kaiser Southwest State University Computer Science Program Last Time The design process and design methods Design strategies

More information

Part I. Multiple Choice Questions (2 points each):

Part I. Multiple Choice Questions (2 points each): Part I. Multiple Choice Questions (2 points each): 1. Which of the following is NOT a key component of object oriented programming? (a) Inheritance (b) Encapsulation (c) Polymorphism (d) Parallelism ******

More information

C++ INTERVIEW QUESTIONS

C++ INTERVIEW QUESTIONS C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get

More information

Chapter 13 - Inheritance

Chapter 13 - Inheritance Goals Chapter 13 - Inheritance To learn about inheritance To understand how to inherit and override superclass methods To be able to invoke superclass constructors To learn about protected and package

More information

CS1002: COMPUTER SCIENCE OO MODELLING & DESIGN: WEEK 5

CS1002: COMPUTER SCIENCE OO MODELLING & DESIGN: WEEK 5 This Week CS1002: COMPUTER SCIENCE OO MODELLING & DESIGN: WEEK 5 School of Computer Science University of St Andrews Graham Kirby Alan Dearle More on Java classes Constructors Modifiers cdn.videogum.com/img/thumbnails/photos/commenter.jpg

More information

Java SE 8 Programming

Java SE 8 Programming Oracle University Contact Us: 1.800.529.0165 Java SE 8 Programming Duration: 5 Days What you will learn This Java SE 8 Programming training covers the core language features and Application Programming

More information

Java SE 7 Programming

Java SE 7 Programming Oracle University Contact Us: 1.800.529.0165 Java SE 7 Programming Duration: 5 Days What you will learn This Java SE 7 Programming training explores the core Application Programming Interfaces (API) you'll

More information

Java SE 7 Programming

Java SE 7 Programming Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 4108 4709 Java SE 7 Programming Duration: 5 Days What you will learn This Java Programming training covers the core Application Programming

More information

3 Pillars of Object-oriented Programming. Industrial Programming Systems Programming & Scripting. Extending the Example.

3 Pillars of Object-oriented Programming. Industrial Programming Systems Programming & Scripting. Extending the Example. Industrial Programming Systems Programming & Scripting Lecture 12: C# Revision 3 Pillars of Object-oriented Programming Encapsulation: each class should be selfcontained to localise changes. Realised through

More information

The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0

The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0 The following applies to all exams: Once exam vouchers are purchased you have up to one year from the date of purchase to use it. Each voucher is valid for one exam and may only be used at an Authorized

More information

Compiling Object Oriented Languages. What is an Object-Oriented Programming Language? Implementation: Dynamic Binding

Compiling Object Oriented Languages. What is an Object-Oriented Programming Language? Implementation: Dynamic Binding Compiling Object Oriented Languages What is an Object-Oriented Programming Language? Last time Dynamic compilation Today Introduction to compiling object oriented languages What are the issues? Objects

More information

Java SE 7 Programming

Java SE 7 Programming Java SE 7 Programming The second of two courses that cover the Java Standard Edition 7 (Java SE 7) Platform, this course covers the core Application Programming Interfaces (API) you will use to design

More information

Introduction to Programming Block Tutorial C/C++

Introduction to Programming Block Tutorial C/C++ Michael Bader Master s Program Computational Science and Engineering C/C++ Tutorial Overview From Maple to C Variables, Operators, Statements Functions: declaration, definition, parameters Arrays and Pointers

More information

CS193j, Stanford Handout #10 OOP 3

CS193j, Stanford Handout #10 OOP 3 CS193j, Stanford Handout #10 Summer, 2003 Manu Kumar OOP 3 Abstract Superclass Factor Common Code Up Several related classes with overlapping code Factor common code up into a common superclass Examples

More information

Java Programming Language

Java Programming Language Lecture 1 Part II Java Programming Language Additional Features and Constructs Topics in Quantitative Finance: Numerical Solutions of Partial Differential Equations Instructor: Iraj Kani Subclasses and

More information

AP Computer Science Java Subset

AP Computer Science Java Subset APPENDIX A AP Computer Science Java Subset The AP Java subset is intended to outline the features of Java that may appear on the AP Computer Science A Exam. The AP Java subset is NOT intended as an overall

More information

Java Application Developer Certificate Program Competencies

Java Application Developer Certificate Program Competencies Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle

More information

Japan Communication India Skill Development Center

Japan Communication India Skill Development Center Japan Communication India Skill Development Center Java Application System Developer Course Detail Track 2b Java Application Software Developer: Phase1 SQL Overview 70 Introduction Database, DB Server

More information

How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For

How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For Projet Java Responsables: Ocan Sankur, Guillaume Scerri (LSV, ENS Cachan) Objectives - Apprendre à programmer en Java - Travailler à plusieurs sur un gros projet qui a plusieurs aspects: graphisme, interface

More information

D06 PROGRAMMING with JAVA

D06 PROGRAMMING with JAVA Cicles Formatius de Grau Superior Desenvolupament d Aplicacions Informàtiques D06 PROGRAMMING with JAVA Ch13 Inheritance PowerPoint presentation, created by Angel A. Juan - ajuanp(@)gmail.com, for accompanying

More information

Pemrograman Dasar. Basic Elements Of Java

Pemrograman Dasar. Basic Elements Of Java Pemrograman Dasar Basic Elements Of Java Compiling and Running a Java Application 2 Portable Java Application 3 Java Platform Platform: hardware or software environment in which a program runs. Oracle

More information

First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science

First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science First Java Programs V. Paúl Pauca Department of Computer Science Wake Forest University CSC 111D Fall, 2015 Hello World revisited / 8/23/15 The f i r s t o b l i g a t o r y Java program @author Paul Pauca

More information

Cohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT - BCNS/05/FT - BIS/06/FT - BIS/05/FT - BSE/05/FT - BSE/04/PT-BSE/06/FT

Cohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT - BCNS/05/FT - BIS/06/FT - BIS/05/FT - BSE/05/FT - BSE/04/PT-BSE/06/FT BSc (Hons) in Computer Applications, BSc (Hons) Computer Science with Network Security, BSc (Hons) Business Information Systems & BSc (Hons) Software Engineering Cohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT

More information

Course Number: IAC-SOFT-WDAD Web Design and Application Development

Course Number: IAC-SOFT-WDAD Web Design and Application Development Course Number: IAC-SOFT-WDAD Web Design and Application Development Session 1 (10 Hours) Client Side Scripting Session 2 (10 Hours) Server Side Scripting - I Session 3 (10 hours) Database Session 4 (10

More information

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement? 1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members

More information

Preet raj Core Java and Databases CS4PR. Time Allotted: 3 Hours. Final Exam: Total Possible Points 75

Preet raj Core Java and Databases CS4PR. Time Allotted: 3 Hours. Final Exam: Total Possible Points 75 Preet raj Core Java and Databases CS4PR Time Allotted: 3 Hours Final Exam: Total Possible Points 75 Q1. What is difference between overloading and overriding? 10 points a) In overloading, there is a relationship

More information

El Dorado Union High School District Educational Services

El Dorado Union High School District Educational Services El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming II (#495) Rationale: A continuum of courses, including advanced classes in technology is needed.

More information

Object Oriented Software Design II

Object Oriented Software Design II Object Oriented Software Design II Introduction to C++ Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa February 20, 2012 G. Lipari (Scuola Superiore Sant Anna) C++ Intro February

More information

Chapter 6: Programming Languages

Chapter 6: Programming Languages Chapter 6: Programming Languages Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Copyright 2012 Pearson Education, Inc. Chapter 6: Programming Languages 6.1 Historical Perspective

More information

DIPLOMADO DE JAVA - OCA

DIPLOMADO DE JAVA - OCA DIPLOMADO DE JAVA - OCA TABLA DE CONTENIDO INTRODUCCION... 3 ESTRUCTURA DEL DIPLOMADO... 4 Nivel I:... 4 Fundamentals of the Java Programming Language Java SE 7... 4 Introducing the Java Technology...

More information

Java EE Web Development Course Program

Java EE Web Development Course Program Java EE Web Development Course Program Part I Introduction to Programming 1. Introduction to programming. Compilers, interpreters, virtual machines. Primitive types, variables, basic operators, expressions,

More information

WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER

WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER Course Outline (2015) Basic Programming With Procedural & Object Oriented Concepts (C, C++) Training Office# Road: 11, House: 1 A, Nikunja 2, Khilkhet,

More information

Polymorphism. Problems with switch statement. Solution - use virtual functions (polymorphism) Polymorphism

Polymorphism. Problems with switch statement. Solution - use virtual functions (polymorphism) Polymorphism Polymorphism Problems with switch statement Programmer may forget to test all possible cases in a switch. Tracking this down can be time consuming and error prone Solution - use virtual functions (polymorphism)

More information

COMMUNITY COLLEGE OF CITY UNIVERSITY CITY UNIVERSITY OF HONG KONG

COMMUNITY COLLEGE OF CITY UNIVERSITY CITY UNIVERSITY OF HONG KONG COMMUNITY COLLEGE OF CITY UNIVERSITY CITY UNIVERSITY OF HONG KONG Information on a Course offered by Division of Applied Science and Technology Course Title: (English) Java Programming (Chinese) Course

More information

a. Inheritance b. Abstraction 1. Explain the following OOPS concepts with an example

a. Inheritance b. Abstraction 1. Explain the following OOPS concepts with an example 1. Explain the following OOPS concepts with an example a. Inheritance It is the ability to create new classes that contain all the methods and properties of a parent class and additional methods and properties.

More information

Syllabus for CS 134 Java Programming

Syllabus for CS 134 Java Programming - Java Programming Syllabus Page 1 Syllabus for CS 134 Java Programming Computer Science Course Catalog 2000-2001: This course is an introduction to objectoriented programming using the Java language.

More information

An Incomplete C++ Primer. University of Wyoming MA 5310

An Incomplete C++ Primer. University of Wyoming MA 5310 An Incomplete C++ Primer University of Wyoming MA 5310 Professor Craig C. Douglas http://www.mgnet.org/~douglas/classes/na-sc/notes/c++primer.pdf C++ is a legacy programming language, as is other languages

More information

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1 The Java Series Java Essentials I What is Java? Basic Language Constructs Slide 1 What is Java? A general purpose Object Oriented programming language. Created by Sun Microsystems. It s a general purpose

More information

Java How to Program, 5/e Test Item File 1 of 5

Java How to Program, 5/e Test Item File 1 of 5 Java How to Program, 5/e Test Item File 1 of 5 Chapter 8 Section 8.1 8.1 Q1: Object-Oriented Programming encapsulates: a.data and methods. b.information hiding. c.classes. d.adjectives ANS: a. Data and

More information

CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards

CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards Course Title: TeenCoder: Java Programming Course ISBN: 978 0 9887070 2 3 Course Year: 2015 Note: Citation(s) listed may represent

More information

Course MS10975A Introduction to Programming. Length: 5 Days

Course MS10975A Introduction to Programming. Length: 5 Days 3 Riverchase Office Plaza Hoover, Alabama 35244 Phone: 205.989.4944 Fax: 855.317.2187 E-Mail: rwhitney@discoveritt.com Web: www.discoveritt.com Course MS10975A Introduction to Programming Length: 5 Days

More information

CS 111 Classes I 1. Software Organization View to this point:

CS 111 Classes I 1. Software Organization View to this point: CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects

More information

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. 1

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. 1 A Review of the OOP Polymorphism Concept Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. 1 Outline Overview Type Casting and Function Ambiguity Virtual Functions,

More information

ATM Case Study OBJECTIVES. 2005 Pearson Education, Inc. All rights reserved. 2005 Pearson Education, Inc. All rights reserved.

ATM Case Study OBJECTIVES. 2005 Pearson Education, Inc. All rights reserved. 2005 Pearson Education, Inc. All rights reserved. 1 ATM Case Study 2 OBJECTIVES.. 3 2 Requirements 2.9 (Optional) Software Engineering Case Study: Examining the Requirements Document 4 Object-oriented design (OOD) process using UML Chapters 3 to 8, 10

More information

Glossary of Object Oriented Terms

Glossary of Object Oriented Terms Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction

More information

Testing Tools Content (Manual with Selenium) Levels of Testing

Testing Tools Content (Manual with Selenium) Levels of Testing Course Objectives: This course is designed to train the fresher's, intermediate and professionals on testing with the concepts of manual testing and Automation with Selenium. The main focus is, once the

More information

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program Free Java textbook available online "Thinking in Java" by Bruce Eckel, 4th edition, 2006, ISBN 0131872486, Pearson Education Introduction to the Java programming language CS 4354 Summer II 2015 The third

More information

Japan Communication India Skill Development Center

Japan Communication India Skill Development Center Japan Communication India Skill Development Center Java Application System Developer Course Detail Track 3 Java Application Software Developer: Phase1 SQL Overview 70 Querying & Updating Data (Review)

More information

Japan Communication India Skill Development Center

Japan Communication India Skill Development Center Japan Communication India Skill Development Center Java Application System Developer Course Detail Track 2a Java Application Software Developer: Phase1 SQL Overview 70 Introduction Database, DB Server

More information

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program Free Java textbook available online "Thinking in Java" by Bruce Eckel, 4th edition, 2006, ISBN 0131872486, Pearson Education Introduction to the Java programming language CS 4354 Summer II 2014 Jill Seaman

More information

Object-Oriented Programming in Java

Object-Oriented Programming in Java Object-Oriented Programming in Java Quiz 1 Jan 10, 2001 Problem 1: Who wants to be a Java developer? (with apologies to Regis) Fill in your answer in the space provided. Question 1: Which is these word-pairs

More information

Compile-time type versus run-time type. Consider the parameter to this function:

Compile-time type versus run-time type. Consider the parameter to this function: CS107L Handout 07 Autumn 2007 November 16, 2007 Advanced Inheritance and Virtual Methods Employee.h class Employee public: Employee(const string& name, double attitude, double wage); virtual ~Employee();

More information

Chapter 5 Aspect Oriented Programming

Chapter 5 Aspect Oriented Programming 2I1AC3 : Génie logiciel et Patrons de conception Chapter 5 Aspect Oriented Programming J'ai toujours rêvé d'un ordinateur qui soit aussi facile à utiliser qu'un téléphone. Mon rêve s'est réalisé. Je ne

More information

The Interface Concept

The Interface Concept Multiple inheritance Interfaces Four often used Java interfaces Iterator Cloneable Serializable Comparable The Interface Concept OOP: The Interface Concept 1 Multiple Inheritance, Example Person name()

More information

Computing Concepts with Java Essentials

Computing Concepts with Java Essentials 2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Computing Concepts with Java Essentials 3rd Edition Cay Horstmann

More information

Description of Class Mutation Mutation Operators for Java

Description of Class Mutation Mutation Operators for Java Description of Class Mutation Mutation Operators for Java Yu-Seung Ma Electronics and Telecommunications Research Institute, Korea ysma@etri.re.kr Jeff Offutt Software Engineering George Mason University

More information

CIS 190: C/C++ Programming. Polymorphism

CIS 190: C/C++ Programming. Polymorphism CIS 190: C/C++ Programming Polymorphism Outline Review of Inheritance Polymorphism Car Example Virtual Functions Virtual Function Types Virtual Table Pointers Virtual Constructors/Destructors Review of

More information

William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline

William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline 1. TITLE OF COURSE AND COURSE NUMBER: Object-Oriented Programming in Java, CIT 2420

More information

Computer Information Systems (CIS)

Computer Information Systems (CIS) Computer Information Systems (CIS) CIS 113 Spreadsheet Software Applications Prerequisite: CIS 146 or spreadsheet experience This course provides students with hands-on experience using spreadsheet software.

More information

Aspect-Oriented Programming

Aspect-Oriented Programming Aspect-Oriented Programming An Introduction to Aspect-Oriented Programming and AspectJ Niklas Påhlsson Department of Technology University of Kalmar S 391 82 Kalmar SWEDEN Topic Report for Software Engineering

More information

Programmation 2. Introduction à la programmation Java

Programmation 2. Introduction à la programmation Java Programmation 2 Introduction à la programmation Java 1 Course information CM: 6 x 2 hours TP: 6 x 2 hours CM: Alexandru Costan alexandru.costan at inria.fr TP: Vincent Laporte vincent.laporte at irisa.fr

More information

Japan Communication India Skill Development Center

Japan Communication India Skill Development Center Japan Communication India Skill Development Center Java Application System Developer Course Detail Track 1B Java Application Software Developer: Phase1 DBMS Concept 20 Entities Relationships Attributes

More information

Tutorial on Writing Modular Programs in Scala

Tutorial on Writing Modular Programs in Scala Tutorial on Writing Modular Programs in Scala Martin Odersky and Gilles Dubochet 13 September 2006 Tutorial on Writing Modular Programs in Scala Martin Odersky and Gilles Dubochet 1 of 45 Welcome to the

More information

Object-Oriented Programming: Polymorphism

Object-Oriented Programming: Polymorphism 1 10 Object-Oriented Programming: Polymorphism 10.3 Demonstrating Polymorphic Behavior 10.4 Abstract Classes and Methods 10.5 Case Study: Payroll System Using Polymorphism 10.6 final Methods and Classes

More information

Java Programming. Binnur Kurt binnur.kurt@ieee.org. Istanbul Technical University Computer Engineering Department. Java Programming. Version 0.0.

Java Programming. Binnur Kurt binnur.kurt@ieee.org. Istanbul Technical University Computer Engineering Department. Java Programming. Version 0.0. Java Programming Binnur Kurt binnur.kurt@ieee.org Istanbul Technical University Computer Engineering Department Java Programming 1 Version 0.0.4 About the Lecturer BSc İTÜ, Computer Engineering Department,

More information

Polymorphism. Why use polymorphism Upcast revisited (and downcast) Static and dynamic type Dynamic binding. Polymorphism.

Polymorphism. Why use polymorphism Upcast revisited (and downcast) Static and dynamic type Dynamic binding. Polymorphism. Why use polymorphism Upcast revisited (and downcast) Static and dynamic type Dynamic binding Polymorphism Polymorphism A polymorphic field (the state design pattern) Abstract classes The composite design

More information

BCS Higher Education Qualifications. Professional Graduate Diploma in IT. Programming Paradigms Syllabus

BCS Higher Education Qualifications. Professional Graduate Diploma in IT. Programming Paradigms Syllabus BCS Higher Education Qualifications Professional Graduate Diploma in IT Programming Paradigms Syllabus Version: 180516 Contents 1. Change History 3 2. Rationale 3 3. Aims 3 4. Objectives 3 5. Prior Knowledge

More information

Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies)

Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies) Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies) Duration of Course: 6 Months Fees: Rs. 25,000/- (including Service Tax) Eligibility: B.E./B.Tech., M.Sc.(IT/ computer

More information

qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq

qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq Introduction to Programming using Java wertyuiopasdfghjklzxcvbnmqwertyui

More information

Java CPD (I) Frans Coenen Department of Computer Science

Java CPD (I) Frans Coenen Department of Computer Science Java CPD (I) Frans Coenen Department of Computer Science Content Session 1, 12:45-14:30 (First Java Programme, Inheritance, Arithmetic) Session 2, 14:45-16:45 (Input and Programme Constructs) Materials

More information

Web Development in Java

Web Development in Java Web Development in Java Detailed Course Brochure @All Rights Reserved. Techcanvass, 265, Powai Plaza, Hiranandani Garden, Powai, Mumbai www.techcanvass.com Tel: +91 22 40155175 Mob: 773 877 3108 P a g

More information

Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is

Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is preceded by an equal sign d. its name has undereline 2. Associations

More information

Agile Software Development

Agile Software Development Agile Software Development Lecturer: Raman Ramsin Lecture 13 Refactoring Part 3 1 Dealing with Generalization: Pull Up Constructor Body Pull Up Constructor Body You have constructors on subclasses with

More information

How To Teach C++ Data Structure Programming

How To Teach C++ Data Structure Programming UTSA EE 3223 - C++ Data Structures Syllabus Fall 2015 Part A - Course Outline Catalog Description: 3 hours credit. Review of C/C++ non-object oriented programming concepts. Object-oriented programming

More information

Advanced OOP Concepts in Java

Advanced OOP Concepts in Java Advanced OOP Concepts in Java Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@imap.pitt.edu http://www.sis.pitt.edu/~spring 09/28/2001 1 Overview

More information

Copyright. Restricted Rights Legend. Trademarks or Service Marks. Copyright 2003 BEA Systems, Inc. All Rights Reserved.

Copyright. Restricted Rights Legend. Trademarks or Service Marks. Copyright 2003 BEA Systems, Inc. All Rights Reserved. Version 8.1 SP4 December 2004 Copyright Copyright 2003 BEA Systems, Inc. All Rights Reserved. Restricted Rights Legend This software and documentation is subject to and made available only pursuant to

More information

Hoare-Style Monitors for Java

Hoare-Style Monitors for Java Hoare-Style Monitors for Java Theodore S Norvell Electrical and Computer Engineering Memorial University February 17, 2006 1 Hoare-Style Monitors Coordinating the interactions of two or more threads can

More information

Server-Side Scripting and Web Development. By Susan L. Miertschin

Server-Side Scripting and Web Development. By Susan L. Miertschin Server-Side Scripting and Web Development By Susan L. Miertschin The OOP Development Approach OOP = Object Oriented Programming Large production projects are created by teams Each team works on a part

More information

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C 1 An essential part of any embedded system design Programming 2 Programming in Assembly or HLL Processor and memory-sensitive

More information

Lecture 1 Introduction to Android

Lecture 1 Introduction to Android These slides are by Dr. Jaerock Kwon at. The original URL is http://kettering.jrkwon.com/sites/default/files/2011-2/ce-491/lecture/alecture-01.pdf so please use that instead of pointing to this local copy

More information

Specialized Programme on Web Application Development using Open Source Tools

Specialized Programme on Web Application Development using Open Source Tools Specialized Programme on Web Application Development using Open Source Tools A. NAME OF INSTITUTE Centre For Development of Advanced Computing B. NAME/TITLE OF THE COURSE C. COURSE DATES WITH DURATION

More information

ICOM 4015: Advanced Programming

ICOM 4015: Advanced Programming ICOM 4015: Advanced Programming Lecture 10 Reading: Chapter Ten: Inheritance Copyright 2009 by John Wiley & Sons. All rights reserved. Chapter 10 Inheritance Chapter Goals To learn about inheritance To

More information

The Clean programming language. Group 25, Jingui Li, Daren Tuzi

The Clean programming language. Group 25, Jingui Li, Daren Tuzi The Clean programming language Group 25, Jingui Li, Daren Tuzi The Clean programming language Overview The Clean programming language first appeared in 1987 and is still being further developed. It was

More information

Overview. Elements of Programming Languages. Advanced constructs. Motivating inner class example

Overview. Elements of Programming Languages. Advanced constructs. Motivating inner class example Overview Elements of Programming Languages Lecture 12: Object-oriented functional programming James Cheney University of Edinburgh November 6, 2015 We ve now covered: basics of functional and imperative

More information

Lecture 7 Notes: Object-Oriented Programming (OOP) and Inheritance

Lecture 7 Notes: Object-Oriented Programming (OOP) and Inheritance Introduction to C++ January 19, 2011 Massachusetts Institute of Technology 6.096 Lecture 7 Notes: Object-Oriented Programming (OOP) and Inheritance We ve already seen how to define composite datatypes

More information

JavaCard. Java Card - old vs new

JavaCard. Java Card - old vs new JavaCard 1 Old Smart Cards: One program (applet) Written in machine-code, specific to chip Burned into ROM Java Card - old vs new old vs new smartcards New Smart Cards: Applet written in high-level language

More information

TOWARDS A GREEN PROGRAMMING PARADIGM FOR MOBILE SOFTWARE DEVELOPMENT

TOWARDS A GREEN PROGRAMMING PARADIGM FOR MOBILE SOFTWARE DEVELOPMENT TOWARDS A GREEN PROGRAMMING PARADIGM FOR MOBILE SOFTWARE DEVELOPMENT Selvakumar Samuel Asia Pacific University of Technology and Innovation Technology Park Malaysia 57000 Bukit Jalil, Malaysia. Email:

More information

Some Scanner Class Methods

Some Scanner Class Methods Keyboard Input Scanner, Documentation, Style Java 5.0 has reasonable facilities for handling keyboard input. These facilities are provided by the Scanner class in the java.util package. A package is a

More information