Lecture21 - Java Programming, 3e Concepts and Techniques...

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

View Full Document Right Arrow Icon
Java Programming, 3e Concepts and Techniques Chapter 5 Arrays, Loops, and Layout Managers Using External Classes (III) ICTN 2730 Lecture 21 02/29/2008
Background image of page 1

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

View Full DocumentRight Arrow Icon
Chapter 4: Decision Making and Repetition with Reusable Objects 2 Assignments Read chapter 5 and lecture notes. Homework 7 is due next Wednesday. Examine Java API specification web site: http://java.sun.com/j2se/1.5.0/docs/api
Background image of page 2
Chapter 4: Decision Making and Repetition with Reusable Objects 3 Object Oriented Programming Concepts What is a class? A class represents the common structure and behavior shared by the same type of objects. A class is a blueprint or prototype from which objects are created. For example, every employee has a name, salary, address and maybe an email account. What is an object? Data (attributes) and operations (methods) are packaged into a single unit called an object. An object is an instance of the class. “Faculty f = new Faculty();” creates an instance of the Faculty class, aka, a Faculty object. It contains the attributes and methods defined in the Faculty class.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Chapter 4: Decision Making and Repetition with Reusable Objects 4 The Employee Class The Employee class creates a Employee object Variables and attributes: org, city, state Methods: getSalary(), getName(), TaxWithheld(), getEmail() …. +getSalary() : double +getName() : String +TaxWithheld() : double +org : String +city : String +state : String Employee Name Data and attributes Methods
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.

This note was uploaded on 04/29/2008 for the course ICTN 2730 taught by Professor Li during the Spring '08 term at East Carolina University .

Page1 / 17

Lecture21 - Java Programming, 3e Concepts and Techniques...

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