Objects First with Java A Practical Introduction using BlueJ

Similar documents
Objects First with Java A Practical Introduction using BlueJ

CS111: PROGRAMMING LANGUAGE II. Lecture 1: Introduction to classes

Object Oriented Design: Identifying Objects

Objects First With Java: A Practical Introduction Using BlueJ (5th Edition) By David J. Barnes, Michael Kolling

Objects First with Java

Foundations of object orientation

What is a Programming Paradigm

Elementary Concepts of Object Class

OBJECTS FIRST WITH JAVA 5TH EDITION PDF

Part 1: Introduction. Course Contents. Books. Goals. Sources for Slides (Acknowledgements) Webpage. The course web page is at

OBJECT ORIENTED PROGRAMMING

OBJECT INTERACTION. CITS1001 week 3

Some miscellaneous concepts

Lab: PiggyBank. Defining objects & classes

Objects First With Java 5th Edition Solutions

CHAPTER 5 GENERAL OOP CONCEPTS

AP Computer Science A Syllabus

Inheritance. Exploring Polymorphism. Mairead Meagher Dr. Siobhán Drohan. Produced by: Department of Computing and Mathematics

COURSE OVERVIEW. Successful completion of this course may provide one semester of college credit for computer science.

Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci)

OOSE2 Vererbung und Polymorphie mit BlueJ

More Sophisticated Behaviour

Objects First With Java A Practical Introduction Using Bluej 5th Edition 5th Edition By Barnes David J Ki 1 2 Lling Michael 2011 Paperback

OBJECT INTERACTION CITS1001

Ticket Machine Project(s)

Computer Science for Engineers

Object-Oriented Modeling Using UML. CS151 Chris Pollett Aug. 29, 2005.

Programming 1 Semester 1, 2014 Assignment 3

UNDERSTANDING CLASS DEFINITIONS CITS1001

Curriculum Map Grade(s): Subject: AP Computer Science

CSE1720. General Info Continuation of Chapter 9 Read Chapter 10 for next week. Second level Third level Fourth level Fifth level

Data Structures and Algorithms Design Goals Implementation Goals Design Principles Design Techniques. Version 03.s 2-1

CITS1001 week 4 Grouping objects

A201 Object Oriented Programming with Visual Basic.Net

Object oriented programming Concepts

Object Oriented Analysis & Design (OOAD)

CO Java SE 8: Fundamentals

The Object Oriented Paradigm

Defining Classes and Methods

Chapter 5 Object-Oriented Programming

CSC 210 COMPUTER SCIENCE II

Scope of this lecture. Repetition For loops While loops

More sophisticated behaviour

Paytm Programming Sample paper: 1) A copy constructor is called. a. when an object is returned by value

Welcome to Design Patterns! For syllabus, course specifics, assignments, etc., please see Canvas

Inheritance. Improving Structure with Inheritance. Dr. Siobhán Drohan Mairead Meagher. Produced by:

Introduction to Programming Using Java (98-388)

Object Oriented Programming

FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

Objects and Classes Lecture 1

Understanding class definitions. Looking inside classes (based on lecture slides by Barnes and Kölling)

Inheritance. Inheritance Reserved word protected Reserved word super Overriding methods Class Hierarchies Reading for this lecture: L&L

CSE 114, Computer Science 1 Course Information. Spring 2017 Stony Brook University Instructor: Dr. Paul Fodor

CompuScholar, Inc. 9th - 12th grades

Object Oriented Programming. C++ 6 th Sem, A Div Ms. Mouna M. Naravani

This exam is open book. Each question is worth 3 points.

Inheritance and Polymorphism

9/24/2018 Programming Data Structures

Reviewing for the Midterm Covers chapters 1 to 5, 7 to 9. Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013

Multi-Paradigm Approach for Teaching Programming

Structured Programming

Objects First With Java A Practical Introduction Using Bluej Global Edition

Introduction to Software Engineering p. 1 The Scope of Software Engineering p. 3 Historical Aspects p. 4 Economic Aspects p. 7 Maintenance Aspects p.

More Sophisticated Behaviour

TeeJay - A Tool for the Interactive Definition and Execution of Function-oriented Tests on Java Objects

COMP1400 Programming for Designers. Claude Sammut

CSC207H: Software Design SOLID. CSC207 Winter 2018

This course supports the assessment for Scripting and Programming Applications. The course covers 4 competencies and represents 4 competency units.

Part 7 - Object Oriented Concepts Classes, Objects, Properties and Methods

Classes and Objects. COMP1400/INFS1609 Week 8. Monday, 10 September 12

ITT Technical Institute. SD1420 Introduction to Java Programming Onsite and Online Course SYLLABUS

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

Objects First with Java - A Practical Introduction using BlueJ, David J. Barnes, Michael Kölling 2

CS487 Midterm Exam Summer 2005

Fundamental Concepts

EECS168 Exam 3 Review

Object-Oriented Programming Using C++ (Introduction To Programming) PDF

C++ Important Questions with Answers

Java 2. Course Outcome Summary. Western Technical College. Course Information. Course History. Course Competencies

Introduction... ix. Chapter 1: Exploring Fundamental Programming Concepts... 1

Grouping objects. Main concepts to be covered

PESIT- Bangalore South Campus Hosur Road (1km Before Electronic city) Bangalore

Syllabus. College for Computer & Information Sciences 3333 Regis Boulevard, Denver, CO regis.edu

BCS Higher Education Qualifications. Diploma in IT. Object Oriented Programming Syllabus

Class Meeting 04 (Lecture 03) Objectives for this class meeting

UML Primer. -Elango Sundaram

CSCI-142 Exam 1 Review September 25, 2016 Presented by the RIT Computer Science Community

Java And Object Oriented Programming Paradigm Debasis Jana

by Pearson Education, Inc. All Rights Reserved. 2

Object-Oriented Programming (OOP) Fundamental Principles of OOP

A SHIFT OF ACCENT IN INTRODUCTORY OBJECT ORIENTED PROGRAMMING COURSES. Eugeni Gentchev*, Claudia Roda**

CSI33 Data Structures

AC : TEACHING JAVA OBJECTS FIRST WITH BLUEJ

Data Structures and Programming with C++

Procedural Programming

Overview. ITI Introduction to Computing II. Interface 1. Problem 1. Problem 1: Array sorting. Problem 1: Array sorting. Problem 1: Array sorting

Software Design Models, Tools & Processes. Lecture 6: Transition Phase Cecilia Mascolo

NCC EDUCATION INTERNATIONAL DIPLOMA IN COMPUTER STUDIES SYSTEMS DEVELOPMENT. 5 th June 2005

Chapter3: Introduction to Classes and Objects

CmSc 150 Fundamentals of Computing I. Lesson 28: Introduction to Classes and Objects in Java. 1. Classes and Objects

Transcription:

Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling Extensions by H.-J. Bungartz, T. Neckel and M. Roderus 2.1

Course Contents Introduction to object-oriented programming with a strong software engineering foundation (cf. SWE course in CSE) aimed at producing and maintaining large, high-quality software systems but starting with the first steps. David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 2

Buzzwords to Come responsibility-driven design encapsulation iterators inheritance overriding coupling cohesion interface javadoc mutator methods collections polymorphism David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 3

Goals Sound knowledge of programming principles Sound knowledge of object-orientation Ability to critically assess the quality of a (small) software system Ability to implement a small software system (not just a program ) in Java David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 4

Book David J. Barnes & Michael Kölling Objects First with Java A Practical Introduction using BlueJ Fourth edition, Pearson Education, 2008 ISBN 0-13-606086-2. David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 5

Further Literature CSE Course Advanced Programming link: http://www5.in.tum.de/wiki/index.php/advanced_programm ing_-_winter_10 More references will be given in the Exercises! David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 6

Course Overview (1) Objects and classes Understanding class definitions Object interaction Grouping objects More sophisticated behaviour libraries (Java collections) Well-behaved objects testing, maintaining, debugging David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 7

Course Overview (2) Designing classes Inheritance Polymorphism Extendible, flexible class structures Handling errors Designing applications David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 8

Fundamental Concepts object class method parameter data type David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 9

Objects and Classes objects represent things from the real world, or from some problem domain (ex.: the red car there in the car park ) classes represent all objects of a kind (ex.: car : a vehicle with four wheels and an engine, that can carry a small number of passengers, cf. LONGMAN) David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 10

Methods and Parameters objects have operations which can be invoked (Java calls them methods) methods may have parameters to pass additional information needed to execute are no independent entities, but directly related to objects David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 11

Data Types specify what kind of data can be passed to a parameter examples: integer int (4, 6, 0, ) character strings string ( red, BPX ) David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 12

Other Observations many instances can be created from a single class an object has attributes: values stored in fields the class defines what fields an object has, but each object stores its own set of values (the state of the object) David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 13

State David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 14

Two Circle Objects David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 15

Source Code... in each class (Java code)... defines details of a class (fields and methods). David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 16

Return Values Methods may return a result via a return value. Example: Parabola y = -2.0 * x*x + 10.0*x 4.5; David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 17

Java Reserved Words * not used *** added in java 1.4 ** added in java 1.2 **** added in java 5.0 David J. Barnes, Michael Kölling; extensions by HJB, TN and MR 18