Flux rss

OOP - Data encapsulation

Object-Oriented Programming (OOP)

The concept of encapsulation

Encapsulation is a way of organising data and methods into a structure by concealing the the way the object is implemented, i.e. preventing access to data by any means other than those specified. Encapsulation therefore guarantees the integrity of the data contained in the object.

Concealing data

The user of a particular class does not need to know how the data in that object is structured, this means that a user does not need to know how implementation takes place. By preventing the user from directly modifying attributes, and forcing the user to use defined functions in order to modify them (called interfaces), data integrity is thus ensured (for example, one can ensure that the data type given matches expectations, or is returned within the expected time interval).

Encapsulation defines the access levels for elements of that class. These access levels define the access rights to the data, allowing us to access the data by a method of that particular class itself, from an inheritance class, or even from any other class. There are three levels of access:

  • public: functions of all classes may access the data or methods of a class that is defined with the public access level. This is the lowest level of data protection
  • protected: data access is restricted to functions of inheritance classes, i.e. member functions of that class and all sub-classes
  • private: data access is restricted to methods of that particular class only. This is the highest level of data protection
This document entitled « OOP - Data encapsulation » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.

Résultats pour OOP Data encapsulation

Data transmission - Introduction The purpose of a network is to transmit information from one computer to another. To do this, you first have to decide how to encode the data to be sent, in other words its computer representation. This will differ according to the type of data,... en.kioskea.net/transmission/transintro.php3
Data transmission - Cabling Several physical data-transmission media are available to connect together the various devices on a network. One possibility is to use cables. There are many types of cables, but the most common are: Coaxial cable Double twisted pair Optical fibre... en.kioskea.net/transmission/transcabl.php3

Résultats pour OOP Data encapsulation

Backup Outlook 2003 dataBackup Outlook 2003 data All Outlook 2003 data ( Emails, Agenda, Contacts, Tasks...) are in one file with .pst extension The file is in the following default folder: C:\Documents and Settings\Login\Local Settings\Application... en.kioskea.net/faq/sujet-47-backup-outlook-2003-data

Résultats pour OOP Data encapsulation

MySQL Help, PHP and Database help (Solved)Hello, I am building a form/blog/personal site for a small company. I was wondering if someone could help me in setting up my database. i have thought of a few options but i am not quite sure what one is the best. each user have a person page, they... en.kioskea.net/forum/affich-21728-mysql-help-php-and-database-help
How to merge an excel file to database? (Solved)Could someone please instruct me how to merge an excel file to database (MS Access/FoxPro/Oracle)? en.kioskea.net/forum/affich-19483-how-to-merge-an-excel-file-to-database
On line photo database (Solved)Hello, I am looking for online photo database that I can store my photos. I have being using SnapDrive and PhotoBucket. But I am looking for a site (free) where I can attach notes with each photos. For example I want to attach such notes as the... en.kioskea.net/forum/affich-1681-on-line-photo-database

Résultats pour OOP Data encapsulation

Download Zilla Data NukerBy abolishing files or sensitive or contaminated files, it is possible that fragments stay on the hard disk. These rags can again harm your system if they are not correctly abolished. Zilla Data Nuker abolishes not used files which take of the place... en.kioskea.net/telecharger/telecharger-506-zilla-data-nuker
Download Database Designer Platinum EditionDatabase Designer is a program for creating databases. It requires no programming knowledge. The application offers many tools: additions of fields, images, checks bugs correction syntactic and much more. It also allows the export of basic HTML, text... en.kioskea.net/telecharger/telecharger-1077-database-designer-platinum-edition

Résultats pour OOP Data encapsulation

US-EU private data sharing agreement at hand: reportFile photo shows a United Airlines flight attendant serving passengers. The United States and European Union are close to an agreement to share private data of their citizens, including credit card information, travel history and internet browsing... en.kioskea.net/actualites/us-eu-private-data-sharing-agreement-at-hand-report-10494-actualite.php3
Hacker splashes data from six million Chileans on Internet: reportFile photo shows the view from the San Cristobal hill overlooking the Chilean capital, Santiago. A hacker broke into Chile's government sites mining data from six million people which he then posted on the Internet A hacker broke into... en.kioskea.net/actualites/hacker-splashes-data-from-six-million-chileans-on-internet-report-10363-actualite.php3
Facebook suffers first drop in British users: dataFacebook, the Internet social networking site, has suffered its first drop in British users in 17 months, according to data from web monitoring firm Nielsen Online. Facebook, the Internet social networking site, has suffered its first drop in British... en.kioskea.net/actualites/facebook-suffers-first-drop-in-british-users-data-10141-actualite.php3

Résultats pour OOP Data encapsulation

Databases - DBMS models Databases appeared in the late 1960s, at a time when the need for a flexible information management system had arisen. There are five models of DBMS, which are distinguished based on how they represent the data contained: The hierarchical model: The... en.kioskea.net/bdd/bddtypes.php3
Data transmission - Analogue transmission Analogue data transmission consists of sending information over a physical transmission medium in the form of a wave. Data is transmitted via a carrier wave, a simple wave whose only purpose is to transport data by modification of one of its... en.kioskea.net/transmission/transanalog.php3
Spreadsheets - Data Entry A cell of a worksheet can contain a value or be empty. The value of a cell has two essential characteristics: a type, which means the intrinsic type of the data. There are generally three types of values: numeric values, for example 3.1415927, 58%,... en.kioskea.net/tableur/tabsaisie.php3