# Procedural and Object Oriented Programming (Title)

# Reading

# An Everyday Example of an Object (section) 

# Alarm Clock Example
# Data Attributes:
# current_second(a value in the range of 0-59)
# current_minute(a value in the range of 0-59)
# current_hour(a value in the range of 1-12)
# alarm_time(a valid hour and minute)
# alarm_is_set(True or False)

# Object's Methods:
# set_time  
# set_alarm_time
# set_alarm_on
# set_alarm_off

# Private Methods:
# increment_current_second
# increment_current_minute
# increment_current_hour
# sound_alarm

# End

# Checkpoint

# 10.1 What is an object?
# A. An object is a software entity that contains both data
# and procedures.

# 10.2 What is encapsulation?
# A. The combining of data and code into a single object.

# 10.3 Why is an object's internal data usually hidden
# from outside code? 
# A. When an object's internal data is hidden from outside code
# and access to that data is restricted to the object's methods,
# the data is protected from accidental corruption. In addition,
# the programming code outside the object does not need to know
# about the format or internal structure of the object's data.

# 10.4 What are public methods? What are private methods?
# A. Public methods can be accessed by entities outside the
# object. Private method cannot be accessed by entities 
# outside the object. They are designed to be accessed internally.

# End
# Procedural and Object Oriented Programming (Title)

# Reading

# An Everyday Example of an Object (section) 

# Alarm Clock Example
# Data Attributes:
# current_second(a value in the range of 0-59)
# current_minute(a value in the range of 0-59)
# current_hour(a value in the range of 1-12)
# alarm_time(a valid hour and minute)
# alarm_is_set(True or False)

# Object's Methods:
# set_time  
# set_alarm_time
# set_alarm_on
# set_alarm_off

# Private Methods:
# increment_current_second
# increment_current_minute
# increment_current_hour
# sound_alarm

# End

# Checkpoint

# 10.1 What is an object?
# A. An object is a software entity that contains both data
# and procedures.

# 10.2 What is encapsulation?
# A. The combining of data and code into a single object.

# 10.3 Why is an object's internal data usually hidden
# from outside code? 
# A. When an object's internal data is hidden from outside code
# and access to that data is restricted to the object's methods,
# the data is protected from accidental corruption. In addition,
# the programming code outside the object does not need to know
# about the format or internal structure of the object's data.

# 10.4 What are public methods? What are private methods?
# A. Public methods can be accessed by entities outside the
# object. Private method cannot be accessed by entities 
# outside the object. They are designed to be accessed internally.

# End
# Procedural and Object Oriented Programming (Title) # Reading # An Everyday Example of an Object (section) # Alarm Clock Example # Data Attributes: # current_second(a value in the range of 0-59) # current_minute(a value in the range of 0-59) # current_hour(a value in the range of 1-12) # alarm_time(a valid hour and minute) # alarm_is_set(True or False) # Object's Methods: # set_time # set_alarm_time # set_alarm_on # set_alarm_off # Private Methods: # increment_current_second # increment_current_minute # increment_current_hour # sound_alarm # End # Checkpoint # 10.1 What is an object? # A. An object is a software entity that contains both data # and procedures. # 10.2 What is encapsulation? # A. The combining of data and code into a single object. # 10.3 Why is an object's internal data usually hidden # from outside code? # A. When an object's internal data is hidden from outside code # and access to that data is restricted to the object's methods, # the data is protected from accidental corruption. In addition, # the programming code outside the object does not need to know # about the format or internal structure of the object's data. # 10.4 What are public methods? What are private methods? # A. Public methods can be accessed by entities outside the # object. Private method cannot be accessed by entities # outside the object. They are designed to be accessed internally. # End