5.0 Objects First with Java A Practical Introduction using BlueJ Introduction to Computer Science I Instructor: Allyson Anderson.

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
1 Math 140 Data Structures and Algorithms Course Overview Lecture # 00 01/20/15.
Chapter 10 THINKING IN OBJECTS 1 Object Oriented programming Instructor: Dr. Essam H. Houssein.
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.
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.
Objects First with Java A Practical Introduction using BlueJ
String Concatenation (operator overloading) 3.0.
OBJECT ORIENTED ANALYSIS & DESIGN Vassilka Kirova Department of Computer & Information Science NJIT.
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.
Objects & Object-Oriented Programming (OOP) CSC 1401: Introduction to Programming with Java Week 15 – Lecture 1 Wanda M. Kunkle.
Grouping Objects 1 Introduction to Collections.
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.
1 Programming James King 12 August Aims Give overview of concepts addressed in Web based programming module Teach you enough Java to write simple.
M1G Introduction to Programming 2 1. Designing a program.
Introduction to Object-oriented programming and software development Lecture 1.
BCS 2143 Introduction to Object Oriented and Software Development.
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.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
CSC241 Object-Oriented Programming (OOP) Lecture No. 1.
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.
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.
Programming. To gain a sound knowledge of programming principles To gain a sound knowledge of object- orientation To be able to critically assess the.
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.
CITS1001 Object Oriented Programming and Software Engineering
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.
Chapter 4 Functions Objectives
COS 260 DAY 16 Tony Gauvin.
COS 260 DAY 2 Tony Gauvin.
Objects First with Java A Practical Introduction using BlueJ
Understanding class definitions
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 Introduction to Computer Science I Instructor: Allyson Anderson

2 Take control of your own learning Lecture Labs Web page Book Exercises Tutors 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 behaviour - 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 Demo 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 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

11 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

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). 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 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

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