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

Slides:



Advertisements
Similar presentations
Fields, Constructors, Methods
Advertisements

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
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
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”
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
Objects & Object-Oriented Programming (OOP) CSC 1401: Introduction to Programming with Java Week 15 – Lecture 1 Wanda M. Kunkle.
Make Sure You Know All This!. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling 2 Objects and Classes.
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.
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
1 Programming James King 12 August Aims Give overview of concepts addressed in Web based programming module Teach you enough Java to write simple.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
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 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.
Systems Analysis and Design in a Changing World, 3rd Edition
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.
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.
INM205 Object Oriented Programming in JAVA Dr. Michael Casey Department of Computing.
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 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.1: Objects and Classes msklug.weebly.com. Agenda: Attendance Let’s get started What is Java? Work Time.
6.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Review. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Objects and Classes Objects and Classes –State.
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
About the Presentations
Objects First with Java A Practical Introduction using BlueJ
COS 260 DAY 16 Tony Gauvin.
COS 260 DAY 2 Tony Gauvin.
Slides by Steve Armstrong LeTourneau University Longview, TX
Objects First with Java A Practical Introduction using BlueJ
Understanding class definitions
Basic OOP Concepts and Terms
Objects First with Java A Practical Introduction using BlueJ
COS 260 DAY 6 Tony Gauvin.
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 Fundamental concepts object class method parameter data type Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

10 Objects and classes Classes (noun) –Represent ALL objects of a generic kind or type –eg. a car Objects (proper noun) –Represent ONE specific thing from the real world, or from some domain –eg. the specific red car down there Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

11 Methods and parameters Methods (verbs) –Operations invoked on a particular object –eg. drive the red car Parameters (adverbs) –Additional information necessary to execute the method needs to be passed –eg. drive the red car for 10 miles Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

12 Other observations Many instances can be created from a single class An object has attributes with 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

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

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

15 Source code Each class has its own source code (Java code) Associated with the class are definitions for its details –fields –methods Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling

16 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

17 lab-classes demo Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Class diagram Creating an object (instance) Calling a method –Parameters Data types State of an object (inspector) Multiple instances of a class –Same fields (attributes) –Different states Object interaction

18 BlueJ Class Diagram Object Bench Code Pad Terminal Window Source Code Editor