Thursday 17 March 2016

PHP Class Object Tutorial

class test
{
function test_class()
{
echo "<h1>by default function is public visibility </h1>";
}
function add_num($n1,$n2)
{
return $n1+$n2;
}
private function test_private()
{
echo "<h2> For making private function private keyword is used </h2>";
}
function access_private()
{
$this->test_private();
}
}

Wednesday 16 March 2016

Difference between Top-Down and Bottom- Up Programming

Top Down Programming

Top down approach is used by procedure oriented language like C. In this concern A problem is solved by the top level wise i.e. A main function is created which draw a sketch that how will our program be started and then find out the low level modules further. The problem is divided into the sub modules and implemented each coding separately, which called and control by the main function. Top down approach is no longer popular today.

Bottom Up Programming


Bottom up approach is used by the object oriented language like C++, Java, C#, VB.Net, etc. In this approach design starts with bottom level , by inside of a class. Ones A class is implemented, then object of that class is created. A main function is generally also used here like procedure oriented  languages as a starting point, but it’s used only to call the class functions.

Tuesday 15 March 2016

Calculate Totient number from given number



Q : Write a program to get Totient number from given number?


[     Totient number = All prime number(M)<given prime number(N)
      l.e. N=10
     M={1,3,5,7}=4
]

Answer : 


/*   ::: Girfa :::
http://girfahelp.blogspot.in/p/c-language.html
program : get all prime number less than given number   */

Monday 14 March 2016

Symmetric Encryption



 " Data format changed using a secret key and can be decrypted only with this secret key receiver must have the secret key for decrypt message. Symmetric Encryption. " 

Symmetric encryption is the oldest and best-known technique. A secret key, which can be a number, a word, or just a string of random letters, is applied to the text of a message to change the content in a particular way. This might be as simple as shifting each letter by a number of places in the alphabet. As long as both sender and recipient know the secret key,