• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 9 pages
Summary

Summary Programming Logic and Design Ch 10

Document preview thumbnail
Preview 2 out of 9 pages

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.

Content preview

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

Connected book
 image
Publisher: 2023 ISBN: 9780357880876 Edition: Unknown

Document information

Summarized whole book?
No
Which chapters are summarized?
10
Uploaded on
November 15, 2025
Number of pages
9
Written in
2025/2026
Type
Summary
$3.77

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
tanjanel1303
5.0
(2)
Sold
11
Followers
2
Items
47
Last sold
1 month ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions