Computer Science, asked by mandeepkaurbhinder11, 8 months ago

how is encapsulation implemented in software program ?​

Answers

Answered by mastermaths55
1

Explanation:

Encapsulation is one of the fundamentals of OOP (object-oriented programming). It refers to the bundling of data with the methods that operate on that data. Encapsulation is used to hide the values or state of a structured data object inside a class, preventing unauthorized parties' direct access to them.

Answered by sumanrastogi8
2

Answer:

↓↓

&lt;!DOCTYPE html&gt;</p><p></p><p>&lt;html&gt;</p><p></p><p>&lt;head&gt;</p><p></p><p>&lt;title&gt;CSS Heart Animation&lt;/title&gt;</p><p></p><p>&lt;style&gt;.back{</p><p></p><p>position:fixed;</p><p></p><p>margin:auto;</p><p></p><p>width:100%;</p><p></p><p>heart:100%;</p><p></p><p>top:0;</p><p></p><p>bottom:0;</p><p></p><p>left:0;</p><p></p><p>right:0;</p><p></p><p>padding:0;</p><p></p><p>background-color:white;</p><p></p><p>animation-name:back;</p><p></p><p>animation-duration:3s;</p><p></p><p>animation-iteration-count:infinite;</p><p></p><p>}</p><p></p><p>.heart{</p><p></p><p>background-color:pink;</p><p></p><p>margin:50% auto;</p><p></p><p>top:0;</p><p></p><p>bottom:0;</p><p></p><p>right:0;</p><p></p><p>left:0;</p><p></p><p>padding:0;</p><p></p><p>height:50px;</p><p></p><p>width:50px;</p><p></p><p>transform:rotate(-45deg);</p><p></p><p>animation-name:heart;</p><p></p><p>animation-duration:3s;</p><p></p><p>animation-timing-function:ease-out;</p><p></p><p>animation-iteration-count:infinite;</p><p></p><p>}</p><p></p><p>.heart:before,.heart:after{</p><p></p><p>background-color:pink;</p><p></p><p>position:absolute;</p><p></p><p>content:"";</p><p></p><p>width:50px;</p><p></p><p>height:50px;</p><p></p><p>border-radius:50%;</p><p></p><p>}</p><p></p><p>.heart:before{</p><p></p><p>left:25px;</p><p></p><p>}</p><p></p><p>.heart:after{</p><p></p><p>left:0;</p><p></p><p>top:-25px;</p><p></p><p>}</p><p></p><p>@keyframes heart{</p><p></p><p>0%{</p><p></p><p>transform:scale(1)rotate(-45deg);</p><p></p><p>}</p><p></p><p>50%{</p><p></p><p>transform:scale(0.6)rotate(-45deg);</p><p></p><p>}</p><p></p><p>}</p><p></p><p>@keyframes back{</p><p></p><p>0%{</p><p></p><p>background-color:white;</p><p></p><p>opacity:1;</p><p></p><p>}</p><p></p><p>50%{</p><p></p><p>background-color:#ff0099;</p><p></p><p>}</p><p></p><p>}&lt;/style&gt;</p><p></p><p>&lt;/head&gt;</p><p></p><p>&lt;body&gt;</p><p></p><p>&lt;div class="back"&gt;&lt;/div&gt;</p><p></p><p>&lt;div class="heart"&gt;&lt;/div&gt;</p><p></p><p>&lt;/body&gt;</p><p></p><p>&lt;/html&gt;

Similar questions