• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 9 páginas
Resumen

Summary Programming Logic and Design Ch 10

Document preview thumbnail
Vista previa 2 fuera de 9 páginas

This document provides an in depth and thorough summary of chapter 10 of Programming Logic and Design. It is ready for exam and tests. Everything is laid out as it is in the textbook. All needed information is provided in short. It is written in an easy to study format and reads easy. I got distinctions in exams and tests.

Vista previa del contenido

Chapter 10
The principles of object-oriented programming
 Object-oriented programming (OOP)
 A programming model that focuses on an application’s components and data and the
methods to manipulate them
 Uses all of the familiar concepts from modular procedural programming
 Variables, methods, passing arguments
 Sequence, selection, and looping structures
 But involves a different way of thinking
 Important features of object-oriented languages
 Classes
 Objects
 Polymorphism
 Inheritance
 Encapsulation


Classes
 Class
 Describes a group or collection of objects with common attributes
 Object - One instance of a class
 Sometimes called one instantiation of a class
 When a program creates an object, it instantiates the object
 Example
 Class name: dog
 Attributes: name, age, hasShots
 Methods: changeName, updateShots
 Attributes
 Characteristics that define an object as part of a class
 Example
 Automobile’s attributes: make, model, year, and purchase price
 Methods
 Actions that alter, use, or retrieve the attributes
 Example
 Methods for changing an automobile’s running status, gear, speed, and cleanliness
 Think in an object-oriented manner
 Everything is an object
 Every object is a member of a class
 Is-a relationship

,  “My oak desk with the scratch on top is a Desk”
 Class reusability
 Class’s instance variables
 Data components of a class that belong to every instantiated object
 Often called fields
 State
 A set of all the values or contents of a class object’s instance variables
 Every object that is an instance of a class possesses the same methods
 Create classes from which objects will be instantiated
 Class client or class user
 A program or class that instantiates objects of another prewritten class


Polymorphism
 The world is full of objects
 A door is an object that needs to be open or closed
 But an “open” procedure works differently on different objects
 Open a door
 Open a drawer
 Open a bank account
 Open a file
 Open your eyes
 One “open” procedure can open anything if it gets the correct arguments


Inheritance
 Inheritance
 The process of acquiring the traits of one’s predecessors
 Example
 A door with a stained-glass window inherits all the attributes (doorknob, hinges) and
methods (open and close) of a door
 Once you create an object
 Develop new objects that possess all the traits of the original object
 Plus, new traits


Encapsulation
 Encapsulation
 The process of combining all of an object’s attributes and methods into a single package
 Information hiding (also called data hiding)
 Other classes should not alter an object’s attributes
 Outside classes should only be allowed to make a request that an attribute be altered
 It is up to the class’s methods to determine whether the request is appropriate

Libro relacionado
 image
Editorial: 2023 ISBN: 9780357880876 Edición: Desconocido

Información del documento

¿Un libro?
No
¿Qué capítulos están resumidos?
10
Subido en
15 de noviembre de 2025
Número de páginas
9
Escrito en
2025/2026
Tipo
Resumen
$3.75

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
tanjanel1303
5.0
(2)
Vendido
11
Seguidores
2
Artículos
47
Última venta
1 mes hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes