Objects First with Java A Practical Introduction using BlueJ

Slides:



Advertisements
Similar presentations
Introduction to Object Oriented Programming Java.
Advertisements

Object-Oriented Analysis and Design
CM10134-CM50147 Programming I Basic Programming in Java Marina De Vos.
Objects and Classes First Programming Concepts. 14/10/2004Lecture 1a: Introduction 2 Fundamental Concepts object class method parameter data type.
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
Object Oriented System Development with VB .NET
Objects First with Java A Practical Introduction using BlueJ
Basic OOP Concepts and Terms
Understanding class definitions Looking inside classes 3.0.
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
Introduction to Programming. To gain a sound knowledge of programming principles To gain a sound knowledge of object- orientation To be able to critically.
CO320 Introduction to Object- Oriented Programming Michael Kölling 3.0.
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
2.5 OOP Principles Part 2 academy.zariba.com 1. Lecture Content 1.Polymorphism 2.Cohesion 3.Coupling 2.
Introduction To System Analysis and design
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
1 Programming James King 12 August Aims Give overview of concepts addressed in Web based programming module Teach you enough Java to write simple.
Introduction to Object-oriented programming and software development Lecture 1.
BCS 2143 Introduction to Object Oriented and Software Development.
An Object-Oriented Approach to Programming Logic and Design
5.0 Objects First with Java A Practical Introduction using BlueJ Introduction to Computer Science I Instructor: Allyson Anderson.
Object Oriented Design: Identifying Objects
Objects First With Java A Practical Introduction Using BlueJ Designing applications 1.0.
Introduction to Java. 2 Textbook David J. Barnes & Michael Kölling Objects First with Java A Practical Introduction using BlueJ Fourth edition, Pearson.
OBJECTS AND CLASSES CITS1001. Concepts for this lecture class; object; instance method; parameter; signature data type multiple instances; state method.
1 COS 260 DAY 2 Tony Gauvin. 2 Agenda Questions? Class roll call Blackboard Web Resources Objects and classes 1 st Mini quiz on chap1 terms and concepts.
1 COS 260 DAY 1 Tony Gauvin. 2 Agenda Class roll call Instructor Introduction Instructor’s Educational Philosophy Contract on Classroom Behavior Syllabus.
Systems Analysis and Design in a Changing World, 3rd Edition
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
Understanding class definitions
Designing applications Main concepts to be covered Discovering classes CRC cards Designing interfaces Patterns Objects First with Java - A Practical.
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
Final Review. From ArrayLists to Arrays The ArrayList : used to organize a list of objects –It is a class in the Java API –the ArrayList class uses an.
1 Here are some quotations to get an overview of the kinds of issues of interest.
Programming. To gain a sound knowledge of programming principles To gain a sound knowledge of object- orientation To be able to critically assess the.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Industrial Group Project Introduction to Object Oriented Programming Adelina Basholli, February, 2016.
Functional Processing of Collections (Advanced) 6.0.
6.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Well-behaved objects Main concepts to be covered Testing Debugging Test automation Writing for maintainability © 2017 Pearson Education, Inc. Hoboken,
Data Abstraction: The Walls
Object-Oriented Programming Concepts
Objects and Classes CITS1001 week 1.
COS 260 DAY 1 Tony Gauvin.
Reference: COS240 Syllabus
About the Presentations
Object Oriented Programming
Object-Orientated Programming
Functional Processing of Collections (Advanced)
COS 260 DAY 17 Tony Gauvin.
Understanding class definitions
Objects First with Java A Practical Introduction using BlueJ
Object-Oriented Programming
COS 260 DAY 10 Tony Gauvin.
COS 260 DAY 2 Tony Gauvin.
Slides by Steve Armstrong LeTourneau University Longview, TX
COS 260 DAY 3 Tony Gauvin.
Software Design Lecture : 12.
Object-Oriented Programming
Objects First with Java A Practical Introduction using BlueJ
Understanding class definitions
COS 260 DAY 23 Tony Gauvin.
COS 260 DAY 4 Tony Gauvin.
Object-Oriented Programming
Basic OOP Concepts and Terms
COS 260 DAY 23 Tony Gauvin.
Objects First with Java A Practical Introduction using BlueJ
Introduction to Object-Oriented Programming
Presentation transcript:

Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling Replace this with your course title and your name/contact details. 6.0 © David J. Barnes and Michael Kölling

Objects First with Java Course Contents Introduction to object-oriented programming (OOP) … … with a strong software engineering foundation … … aimed at producing and maintaining large, high-quality software systems. © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved. © David J. Barnes and Michael Kölling

Objects First with Java Buzzwords responsibility-driven design inheritance encapsulation iterators overriding coupling cohesion javadoc interface collection classes mutator methods polymorphic method calls © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved. © David J. Barnes and Michael Kölling

Goals Sound knowledge of programming principles Sound knowledge of object-orientation Able to critically assess the quality of a (small) software system Able to implement a small software system in Java © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Book David J. Barnes & Michael Kölling Objects First with Java A Practical Introduction using BlueJ 6th edition, Pearson Education, 2017 © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

IOOP - Course Overview Objects and classes Understanding class definitions Object interaction Grouping objects More sophisticated behavior - libraries Designing classes Well-behaved objects - testing, maintaining, debugging © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

OOPDA - Course Overview Inheritance Polymorphism Extendable, flexible class structures Building graphical user interfaces Handling errors Designing applications © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Advanced material There is advanced material on: Streams Lambdas 2D arrays This may be skipped on first reading ... or read, according to preference! © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Classes and objects Fundamental to much of the early parts of this course Class: category or type of ‘thing’ (Like a template or blueprint) Object: belongs to a particular class and has individual characteristics Explore through BlueJ … © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Objects First with Java Fundamental concepts It is vital to understand these concepts as soon as possible. object class method parameter data type © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved. © David J. Barnes and Michael Kölling

Classes and Objects Classes (noun) Objects (proper noun) Represents ALL generic objects of a similar kind or type e.g. Car Objects (proper noun) Represents ONE specific thing from the real world or some problem domain e.g. THAT red car in the garage or YOUR green car in the parking lot © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Methods and Parameters Methods (verbs) Objects have operations which can be invoked on a specific object e.g. drive the red car Parameters (adverbs) Additional necessary information may be passed to the method to help with its execution e.g. drive the red car for 10 miles © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Other observations Many distinct instances can be created from a single class An object has attributes that are 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) © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Demo of figures project Objects First with Java Demo of figures project Here, I start discussing objects and classes. I talk to the students about it for a while, then I do an extensive demo of the shapes example in BlueJ. All important points of this lecture are encountered and pointed out during this demo. All following slides serve only as summary, or reminder. No new material is introduced after the demo. © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved. © David J. Barnes and Michael Kölling

State © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Two circle objects © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Source code Each class has its own JAVA source code associated with it that defines its details (attributes and methods) The source code is written to obey the rules of a particular programming language (i.e. JAVA) We will explore this in detail in the next chapter © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Return values All the methods in the figures project have void return types But methods may return a result via a return value that is not void Such methods will have a specific non-void return data type More on this in the next chapter © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Review Classes model concepts Source code realises those concepts Source code defines: What objects can do (methods) What data they store (attributes) Objects come into existence with pre-defined attribute values The methods determine what objects do with their data © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Review When a method is called an object: Alters its state, and/or Uses its data to decide what to do Some methods take parameters that affect their actions Methods without parameters typically use their state to decide what to do Some methods return a value © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.

Review Most programs contain multiple classes At runtime, objects interact with each other to realize the overall effect of the program © 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.