Chapter 58 - Use of object - oriented techniques Flashcards
What is procedural language?
» Uses a series of step-by-step instructions on how to solve the problem
» Breaks down into a number of smaller modules - consists of functions or procedures
Where is the data held in procedural programming?
» Held in seperate primitive variables such as integer or char, or in data structures such as array, list or string
How is everything viewed as in object-oriented programming?
» As a collection of objects
What are the attributes?
» The features of the object
» Variables contained within and associated to an object
What are methods?
» The behaviour of the object
» Actions that can be pefromed by an object
What is the class?
» A blueprint or template for an object/multiple
» Defines the attributes and behaviours of objects in that class
How are attributes declared as?
» Declared as private
How are methods declared as?
» Public
What is the principle of information hiding?
» Where a class cannot directly access the attributes of another class, when they are declared private
What is a constructor?
» A special type of method to construct/build objects in a class
What instantiation?
» Process of creating new instances of a class
What are objects and instance?
» Synonymous
What is a reference variable?
» The object, where memory locations stores the data
What is the purpose of a variable reference diagram?
» Shows in graphical form the object referenced by the variables
What is an object?
» An instance of a new class