Object-Oriented Data Encapsulation & Types
Classified in Computers
Written on in
English with a size of 2.63 KB
Chapter 1: Foundations of Object-Oriented Programming
Data Encapsulation with Classes
The starting point of object-oriented programming is to provide a more faithful implementation of the notion of “type” in programming. The programming languages we are familiar with come with standard built-in types that we can assign to variables and values:
Built-in Programming Types
- In C, we can use
int,float,double,char, etc. - In Haskell, similarly, we can use
Int,Float,Char,Bool, etc.
In addition, programming languages provide a way to assign a single name to a collection of values of the same type. The nature of this collection is determined by the underlying architecture assumed by the programming language.