1 - encapsulation → لما اكون فى كالس و عاوز اعمل تغليف ل متغير محجش يقدر يعمل عليه
اكسز بعملوencapsulation
int _namecompany = "meta"; → private variable
***********************************************************************************
*******************
2 - get , set → to access the value that we encapsulat it we use get , set is to
change the value of the private variable in the class
class company{
int _name = 5;
get companynameget => _name; // here we using arrow function , in retern we write
the variable that is private and we want to access it
set companyNameSet(int edit) => _name = edit; // edit the value of the private
}
in code.
use get → company.companynameget;
use set → company.companyNameSet = 2;
***********************************************************************************
*******************
3 - abstruct class → كالس نرث منو خصائص وال نستطيع انشاء اوبجكت من خالله
***********************************************************************************
*******************
4 - Record → use to return two values or more from methods
Record sum(){
var names = (a:adham , s:samah); // can use key and values
return (name,age);
}
***********************************************************************************
*******************
5 -