Professional Documents
Culture Documents
Amalia Foka
CEID - University of Patras
Object Oriented Programming II (C++)
Fall 2010-2011
Attributes & Operations
Classes have
attributes (data) and
operations (behaviors).
Class attributes implemented as
data members
Class operations implemented as
member functions
Attributes – Real World Examples
Person
height
weight
left-handed
Radio
Frequency tuned
Volume
Band (AM or FM)
Attributes – Requirements Document
Identify Attributes
look for descriptive words and phrases
in the requirements document
assign it to one or more of the classes
identified
create attributes to represent any
additional data that a class may need
Descriptive words and phrases from
the ATM requirements
ATM Class
userAuthenticated
boolean