ObjectsAndClasses-Introduction

ObjectsAndClasses-Introduction - Object-Oriented...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 1 Object-Oriented Programming Concepts: Object Class Java Quick Start: http://java.sun.com/docs/books/tutorial/java/concepts/index.html
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 2 What is an Object ? An object can simply represent any object or entity that you may think of in "real world". e.g. a Person, a Car, a table , a Bank Account, an Employee Every software object have state and behavior state is defined by one or more variables behavior is defined by its methods.
Background image of page 2
COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 3 Visual representation of software objects employee1 name = “Arun”; salary = 3000; setSalary(int s); setName(String s); employee2 name = “Jane”; salary = 3500; setSalary(int s); setName(String s); employee3 name = “Joe”; salary = 2500; setSalary(int s); setName(String s); instance variables (state) methods (behavior)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

ObjectsAndClasses-Introduction - Object-Oriented...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online