Class Notes (921,250)
CA (542,492)
Ryerson (30,884)
ITM (1,261)
ITM 200 (22)
Lecture

Chapter 11

5 Pages
180 Views

Department
Information Technology Management
Course Code
ITM 200
Professor
Vikraman Baskaran

This preview shows pages 1-2. Sign up to view the full 5 pages of the document.
Class Name
State
Behavior
Objects Chapter 11
Objects are unique and can be distinctly identified
An Object has a unique identity, state, behavior
oState: data field (radius = 1), a variable
oBehavior: set of methods (getArea (), getPerimeter ())
Classes are constructs that define objects of the same type
Constructors
Same name as the class name
A constructor with no parameters is referred to as a no-arg constructor
Does not return value no void
Can be overloaded like other methods
Circle mycircle = new Circle(5.0)
oCircle: Data Type
omyCircle: object name
onew: creating a new object
oCircle: calling the constructor
When using this, there has to be a constructor made
Circle
www.notesolution.com
radius: double
numberOfObjects: int
getNumberOfObjects():
int
+getArea(): double
Circle c (Object Type)
c is of type Circle
Variables, Constants & Methods
Instance Variables, and Methods
Instance variables belong to a specific instance
Instance methods are invoked by an instance of the class
Static - Variables, Constants & Methods
Static variables are shared by all the instances of the class
Static methods are not tied to a specific object
Static constants are final variables shared by all the instances of the class
To declare static variables, constants, and methods, use the static modifier
Private
Only available for the declared class
The get and set methods are used to read and modify private properties
Public
Its available for all the classes in any package
www.notesolution.com

Loved by over 2.2 million students

Over 90% improved by at least one letter grade.

Leah — University of Toronto

OneClass has been such a huge help in my studies at UofT especially since I am a transfer student. OneClass is the study buddy I never had before and definitely gives me the extra push to get from a B to an A!

Leah — University of Toronto
Saarim — University of Michigan

Balancing social life With academics can be difficult, that is why I'm so glad that OneClass is out there where I can find the top notes for all of my classes. Now I can be the all-star student I want to be.

Saarim — University of Michigan
Jenna — University of Wisconsin

As a college student living on a college budget, I love how easy it is to earn gift cards just by submitting my notes.

Jenna — University of Wisconsin
Anne — University of California

OneClass has allowed me to catch up with my most difficult course! #lifesaver

Anne — University of California
Description
Class Name State Behavior Objects Chapter 11 Objects are unique and can be distinctly identified An Object has a unique identity, state, behavior o State: data field (radius = 1), a variable o Behavior: set of methods (getArea (), getPerimeter ()) Classes are constructs that define objects of the same type Constructors Same name as the class name A constructor with no parameters is referred to as a no-arg constructor Does not return value no void Can be overloaded like other methods Circle mycircle = new Circle(5.0) o Circle: Data Type o myCircle: object name o new: creating a new object o Circle: calling the constructor When using this, there has to be a constructor made Circle www.notesolution.com
More Less
Unlock Document


Only pages 1-2 are available for preview. Some parts have been intentionally blurred.

Unlock Document
You're Reading a Preview

Unlock to view full version

Unlock Document

Log In


OR

Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit