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

Slides:



Advertisements
Similar presentations
Looking inside classes Fields, Constructors & Methods Week 3.
Advertisements

More Sophisticated Behaviour 1 Using library classes to implement more advanced functionality.
Fields, Constructors, Methods
Further abstraction techniques Abstract classes and interfaces 5.0.
Introduction to Object Oriented Programming Java.
Introduction to Information and Computer Science Computer Programming Lecture e This material (Comp4_Unit5e) was developed by Oregon Health and Science.
Using interfaces Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling How would you find the maximum.
Introduction To System Analysis and Design
More sophisticated behaviour Using library classes to implement some more advanced functionality.
Well-behaved objects 4.0 Testing. 2 Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Main concepts to.
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.
Well-behaved objects Debugging. 2 Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Prevention vs Detection.
Objects First with Java A Practical Introduction using BlueJ
Understanding class definitions Looking inside classes 3.0.
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
More sophisticated behavior Using library classes to implement some more advanced functionality 4.0.
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
Understanding class definitions – Part II –. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Main.
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.
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
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.
5.0 Objects First with Java A Practical Introduction using BlueJ Introduction to Computer Science I Instructor: Allyson Anderson.
Springl 2008 MIS380: Object-Oriented Programming using Java 1 Spring 2008.
Object Oriented Design: Identifying Objects
Introduction To System Analysis and Design
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.
Designing Classes 2 How to write classes in a way that they are easily understandable, maintainable and reusable.
Well-behaved objects Main concepts to be covered Testing Debugging Test automation Writing for maintainability Objects First with Java - A Practical.
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 5.0.
Understanding class definitions
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
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.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 6 Objects and Classes.
1 COS 260 DAY 14 Tony Gauvin. 2 Agenda Questions? 6 th Mini quiz graded  Oct 29 –Chapter 6 Assignment 4 will be posted later Today –First two problems.
Objects First With Java A Practical Introduction Using BlueJ Well-behaved objects 2.1.
Objects First With Java A Practical Introduction Using BlueJ Designing classes How to write classes in a way that they are easily understandable, maintainable.
1 COS 260 DAY 12 Tony Gauvin. 2 Agenda Questions? 5 th Mini quiz –Chapter 5 40 min Assignment 3 Due Assignment 4 will be posted later (next week) –If.
Well-behaved objects Main concepts to be covered Testing Debugging Test automation Writing for maintainability Objects First with Java - A Practical.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
Programming. To gain a sound knowledge of programming principles To gain a sound knowledge of object- orientation To be able to critically assess the.
1 COS 260 DAY 22 Tony Gauvin. 2 Agenda Questions? 9 th Mini Quiz corrected –Good results Assignment 5 Not corrected yet Assignment 6 Posted (one more)
Object-Oriented Programming in Java. 2 CS2336: Object-Oriented Programming in Java Buzzwords interfacejavadoc encapsulation coupling cohesion polymorphic.
6.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Object-Oriented Programming Concepts
Objects and Classes CITS1001 week 1.
COS 260 DAY 1 Tony Gauvin.
Objects First with Java A Practical Introduction using BlueJ
Lecture 2 of Computer Science II
Objects First with Java A Practical Introduction using BlueJ
Understanding class definitions
COS 260 DAY 11 Tony Gauvin.
COS 260 DAY 16 Tony Gauvin.
COS 260 DAY 2 Tony Gauvin.
Objects First with Java A Practical Introduction using BlueJ
Understanding class definitions
COS 260 DAY 23 Tony Gauvin.
Objects First with Java A Practical Introduction using BlueJ
COS 260 DAY 6 Tony Gauvin.
Further abstraction techniques
CS 1054: Lecture 2, Chapter 1 Objects and Classes.
Presentation transcript:

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

2 Take control of your own learning Lecture Classes Exercises Book Web page Discussion forum Study groups Practice, practice, practice! Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

3 Course Contents Introduction to object-oriented programming… …with a strong software engineering foundation… …aimed at producing and maintaining large, high-quality software systems. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

4 Buzzwords interface Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling javadoc encapsulation coupling cohesion polymorphic method calls inheritance mutator methods collection classes overridingiterators responsibility-driven design

5 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 Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

6 Book Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling David J. Barnes & Michael Kölling Objects First with Java A Practical Introduction using BlueJ 5th edition, Pearson Education, 2012 ISBN

7 Course overview (1) Objects and classes Understanding class definitions Object interaction Grouping objects More sophisticated behavior - libraries Designing classes Well-behaved objects - testing, maintaining, debugging Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

8 Course overview (2) Inheritance Polymorphism Extendable, flexible class structures Building graphical user interfaces Handling errors Designing applications Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

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

10 Fundamental concepts object class method parameter data type Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

11 Objects and classes objects –represent ‘things’ from the real world, or from some problem domain (example: “the red car down there in the car park”) classes –represent all objects of a kind (example: “car”) Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

12 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. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

13 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). Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

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

15 Two circle objects Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

16 Source code Each class has source code (Java code) associated with it that defines its details (fields and methods). Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

17 Return values All the methods in the figures project have void return types; but … … methods may return a result via a return value. Such methods have a non- void return type. More on this in the next chapter. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling