lecture3

lecture3 - ISE 582 Web Technology for IE 11 September 2003...

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

View Full Document Right Arrow Icon
ISE 582: Web Technology for IE 11 September 2003 http://www-classes.usc.edu/engr/ise/582 1 ISE 582: Information Technology for Industrial Engineering Instructor: Elaine Chew University of Southern California Department of Industrial and Systems Engineering Lecture 3 First cup of JAVA 11 September 2003 ISE 582: Web Technology for IE 2 The Agenda for Today • Review: A simple Java program • Example: Quidditch • The Math class: Arithmetic Expressions • Properties of parameters (variables) • Procedure abstraction • Class variables • Class instances • Instance methods • Constructors 11 September 2003 ISE 582: Web Technology for IE 3 Introduction to Objects • Object Instance – Attributes (properties): associated data – Operations: actions that change attributes Methods in JAVA Member functions in C++ • Object Class – Category or set of objects – Share same attributes, operations and relationships to other objects
Background image of page 1

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

View Full DocumentRight Arrow Icon
ISE 582: Web Technology for IE 11 September 2003 http://www-classes.usc.edu/engr/ise/582 2 11 September 2003 ISE 582: Web Technology for IE 4 Quidditch Quidditch is a game played in mid-air on broomsticks that is a cross between rugby, basketball and the emergency room. Each team consists of seven players; three Chasers, two Beaters, one Seeker and one Keeper. The Keeper acts as a goalie against the other team making a score in one of their three hoops. The Chasers work together to score, using a ball known as the Quaffle. Scoring with the Quaffle is worth ten points. Two other balls known as Bludgers are enchanted to try and knock the players from their brooms. It is up to the Beaters to keep this from happening. Equipped with bats similar to those used in Cricket, Beaters work furiously to keep their teammates from being injured by Bludgers. Last and never least, the Seekers have the important task of catching the Snitch. This ball is the size of a walnut with wings and flies around the Pitch independantly. Capture of the Snitch is worth 150 points, and it automatically ends the game. However, this doesn't mean the team that catches the Snitch automatically wins. The game can also be ended with the mutual consent of both team captains From ht p:/ www.pensievemush.org/hogwarts.html The Quaf le The Golden Snitch 11 September 2003 ISE 582: Web Technology for IE 5 Example: Object Class QuidditchTeam name quaffle snitch totalScore setScore(…) addQuaffle() addSnitch() Class name Attributes Operations 11 September 2003 ISE 582: Web Technology for IE 6 Example: Object Instances t1: QuidditchTeam name = “Hufflepuff” quaffles = 5 snitch = 0 totalScore = 50 t2: QuidditchTeam name = “Gryffindor” quaffles = 3 snitch = 1 totalScore = 180
Background image of page 2
ISE 582: Web Technology for IE 11 September 2003 http://www-classes.usc.edu/engr/ise/582 3 11 September 2003 ISE 582: Web Technology for IE 7 • Convention: – Attributes/operation names begin with lower-case characters – Class and type names are capitalized
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/01/2009 for the course ISE 582 taught by Professor Chew during the Fall '03 term at USC.

Page1 / 13

lecture3 - ISE 582 Web Technology for IE 11 September 2003...

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

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