일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- concept
- hardhat
- useState
- built in object
- Ethereum
- graphQL
- nextJS
- JavaScript
- express.js
- tailwindcss
- CLASS
- web
- HTML
- blockchain
- middleware
- SSR
- Props
- REACT
- node.js
- 기준
- CSS
- Interface
- 삶
- error
- API
- evm
- solidity
- typeScript
- Redux
- bitcoin
- Today
- Total
목록encapsulation (2)
ReasonJun
Encapsulation Encapsulation is one of the four main principles of OOP, often referred to as the four pillars of OOP, which also include inheritance, polymorphism, and abstraction. Encapsulation involves bundling data (attributes or properties) and methods (functions or procedures) that operate on that data into a single unit, known as a class. This class acts as a blueprint for creating objects,..
// SPDX-License-Identifier: MIT pragma solidity >= 0.7.0 < 0.9.0; contract Number { uint private num = 4; function changeNum() public { num = 5; } function getNum() public view returns (uint) { return num; } } contract Caller { Number internal instance = new Number(); function changeNumber() public { instance.changeNum(); } function getNumber() public view returns(uint) { return instance.getNum(..