MS Rumi. Powered by Blogger.

Saturday, 21 March 2015

Join WhatsAapp Group Chat 2015 (For Friendship)

Join Whatsapp Group (KapiShup)

We are starting our new whatapp group for every one from all over the world. Where boys and girls will make friends. This group is only for people those are under 30. In this group you can post every thing you
want their is no restriction but that should not be adult stuff. KapiShup is whatsapp group for single married men and woman those who seeking dating partner or friends.

To Join Group

Enter your name and number in comment section.
If you dont want to share your number publicly just mail us your number and name here>> msrt92@gmail.com

Benefits

    • New Friends
    • Funny Videos
    • Dating partner 
    • Learn New Language
    • Learn About others Culture

    WhatsApp Countries

    Afghanistan
    Bahrain
    Bangladesh
    Bhutan
    China
    Chile
    Chad
    Denmark
    Egypt
    Georgia
    Hungry
    Iceland
    India
    Indonesia
    Iran
    Iraq
    Jamaica
    Japan
    Jordan
    Kenya
    Kazkistan
    Libya
    Malaysia
    Maldive
    Mexico
    Nepal
    New Zealand
    Oman
    Pakistan
    Philippians
    Qatar
    Russia
    SriLanka
    Spain
    Turkey
    United Arab Emirates
    United Kingdom
    Vietenam
    Yaman
    Zimbabwe






Thursday, 30 October 2014

C++ Project For Novice Programmer Bank Account With Classes

What is Static Variable in c++?

In simple computer codding or in programming, variable that allocated statically called static variable. Static variable saved in memory till program ends . In other words its the variable you define as static and it will store at the same place or location you assign it and it will remain at same place throughout the execution of your whole program.
Static Local Variable
Static Variable in C++
Question Asked in Interview "What is Static?"
Answer:- It is a variable that is declared static in the body of function and it maintains its data or value throughout the function.
Static Variable is declare : static int   totalObject;
Initializing Value, Outside  the class   e.g int Bank :: totalObject=0;  You can check in example below.
Operation: totalObject++; inside the class

What is member Initializer list in c++ and Why need it?

Member intilializer is a constructor used in c++. Instant of using variable inside the constructor here we use it outside the constructor body. Variable are listed after the header of the constructor and it is separated by a colon (:). Every variable is in the form of data member name and parameter  from the main function.
Member Intitializer in C++
Member Intitializer

Example of Member Initializer and Static Variable

#include<iostream.h>
class Bank                        // Class Name
{
    private:                  
        const int password;        // Constant Integer
        char *name;                // Pointer Character For Dynamic Charracter Array
        int amount;                // Simple integer
    public:
        static int totalObject; // Static Integer
        Bank(int pass):password(pass), name(NULL),amount(0) // Member Intilizer For Constant Variable
        {
            totalObject++; // When Constructor will call it will one to variable
            name= new char [20];  // Assigning memory to name
        }
        // Setters.....
        void setName(char *n)    // setter for Name
        {
            name=n;
        }
        void setAmount(int am)  // Setter For Amount
        {
            amount=am;
        }
        // Getters
        char* getName()
        {
            return name;
        }
        int getAmount()
        {
            return amount;
        }
        const int getPassword()
        {
            return password;
        }
        // Function For Transaction
        void Deposit(int DA) // Function To Deposit Amount
        {
            amount=amount+DA;
            cout<<"After you Deposit amount your new balance is:"<<amount<<endl;
        }
        void withDraw(int wd)  // Function to Withdraw and Update Amount
        {
            amount=amount-wd;        // Amount will Here
            cout<<"After Withdraw Your New Amount is:"<<amount<<endl;
        }
      
};
// Intiliazing Static variable
int Bank::totalObject=0;

// Main Function
void main ()
{
    int deposit,witdraw,password,amount;
    char name[20];
    // Entering Data For Account
    cout<<"Enter User Name: ";
    cin>>name;
    cout<<"Enter Pssword For Account: ";
    cin>>password;
    Bank Account(password); // Creating Object and assigning constant value
    Account.setName(name);
    cout<<"Enter Amount For Your ACCOUNT:";
    cin>>amount;
    Account.setAmount(amount);
    cout<<"Enter Amount To Deposit:";
    cin>>deposit;
    Account.Deposit(deposit);
    cout<<"Enter Amount To Widraw:";
    cin>>witdraw;
    Account.withDraw(witdraw);
    // Displaying Account Information
    cout<<"Total Objects In Class::"<<Bank::totalObject<<endl;
    cout<<"****Your Complete Account Information*****"<<endl;
    cout<<"Account Name        ::"<<Account.getName()<<endl;
    cout<<"Account Password  ::"<<Account.getPassword()<<endl;
    cout<<"Amount In Account ::"<<Account.getAmount()<<endl;

}

Output of program

 
C++ Project Foe Beginner
Bank Account

Wednesday, 29 October 2014

Download Funny Videos Of Saad Haroon stand up comedy

Saad Haroon stands up 2nd in World Funniest Person Contest

Saad Haroon is very attractive international Pakistani comedian and writer. He is the first Pakistani who created the comedy troupe called black fish. He perform in English across the whole world. He belongs to Karachi Pakistan. Founder of first Pakistani comedy troupe said that it was his aim to win and he had confidence on his ability to win the competition.
Second Funniest Person in The World
Saad Haroon Funniest Person in The World
To be honest, I just kept pushing for it and lost no hope, even when I was in the judging round and not the voting round, I was pretty confident that I’d make it to the finals and I did, said Haroon.
This competition was held in Las Vages and started nearly 5 months back. In the start there were 100 comedian welcome in the competition out of which ten and after that 5 were selected by judges from Hollywood and Las Vagas for the final. Saad Haroon doesn't performed in Pakistan for some reason but now he received love and support from his home country. 
Funniest Person In Pakistan
Saad Haroon Funniest Person In Pakistan
From Last few days it was seen on social media that Pakistan's top celebrities were requesting from their fans to go and vote for Haroon on the factory-laugh website (competition's website). Saad Haroon thanked to Fawad, Ali Zafar, Mahira and meesha shafi for their great support on the twitter and Facebook.

Funny Video By Saad Haroon - You Can Download From Mobile



Tuesday, 28 October 2014

Free Download Famous Top Ten Nohay 2014

Top Pakistani Nohay By Nadeem Sarwar Mp3 Mobile Free Download

Free download all nohay with just one click. Nohay in urdu english and in punjabi with urdu text, nohay in sindhi. Latest nohay by nadeem sarwar 2014, all shia nohay with urdu text and english text, here are the top five nohay by nadeem server. Help us to add more top nohay or if you want to request noha for download just post the name of noha in comment bar, it will be here soon.

Noha At Number 1

Abbas Ajao Bhai Akela
Nadeem Sarwar
Noha Abbas Ajao Bhai Akela
Nohaqan Nadeem Sarwar
Shayar Rehan Azmi
Language Urdu
Topic Ashur
Download Mp3  Click Here To Download
Play Online Click Here To Play Song

  Noha At Number 2

Ya Janaza Hai
Ya Janaza Hai

Noha Ye Janaza Hai Ali Ka
Nohaqan Nadeem Sarwar
Shayar ---------------
Language Urdu
Topic   Hazarat Ali R.A
Download Mp3  Click Here To Download
Play Online Click Here To Play Song

Noha At Number 3

Na Ro Zainab Na Ro Nohay
Na Ro Zainab

Noha Na Ro Zainab Na Ro
Nohaqan Nadeem Sarwar
Shayar ------------------
Language Urdu
Topic Ashura
Download Mp3  Click Here To Download
Play Online Click Here To Play Song

 

Noha At Number 4

Ao Baba Jan Noha
Ao Baba Jan

Song   Ao Baba Jan
Singer Nadeem Sarwar
Studio --------------
Category   Urdu
Season   Hazarat Hussain RA
Download Mp3  Click Here To Download
Play Online Click Here To Play Song

Noha At Number 5

Mola Hussain Mola Noha
Noha At Number 5

Song   Mola Hussain mola
Singer Nadeem Sarwar
Studio --------------
Category   Sindhi
Season   Hazarat Hussain RA
Download Mp3  Click Here To Download
Play Online Click Here To Play Song

Monday, 27 October 2014

Start of Islamic Year Muharram 1436 Hijri

History of Muharram Ul Haram In English

Islamic calender start from Muharram. In this month War (Jang) is Haram that's why this month is called muharram ul haram. From the start of Islamic month Muslim Great Leaders sacrifices their life for Islam.  At first muharram ul haram Hazart Umar Farooq R.A sacrifice life for Islam. He was most influential and powerful Muslim guardian (caliph). Hazart Umar Farooq R.A earned  the title of Al Faruq because he was best jurist in the world  and also best for just nature. At ten muharam ul haram Hazart Imam Husain sacrifice life and its Day Of Ashura . This day is very important for Muslims, and they believe that Huazart Imam Husain Ibn e Ali became martyr in 61 AH.

History of Muharram Ul Haram InUrdu

 

Sunday, 26 October 2014

Interview Question For Association, Composition and Aggregation in OOP

Explanation of  Association, Composition and Aggregation in OOP with examples (C++)

Association

C++ Implementation of Association
It is the relationship between two or more objects, where every objects have its own life cycle and there is no owner of these objects. Let's have an example of association between student and tutor. One student can teach by one tutor, many student can teach by one tutor or many tutor can associate with a single student and also many student associate with many teacher or tutor. Here student and tutor are the objects and both have no owner. They can build and delete independently. Association is represented by a solid line.

Generalization

In object oriented modal some classes may have common characteristic we extract there common feature into new class and inherit original classes from this new class. For example we have two classes Teacher with characteristic name, age, sex, birthday, class, salary and job title  Student with characteristic name, age, sex, birthday, class, fee and GPA. Both classes have some common characteristics so we extract these feature in new class called Person.
Generalization

Specialization 

If we want to add new class to a existing modal, find the similar characteristic into model but some part of behavior of new class is different are restricted for that we can use specialization. For example in previous table we had Person as parent class and teacher and student as child class now we want to add adult class with same characteristics but here age should be more then 18.
Specialization

Class Association

Class association is implemented in term of inheritance implemented generalization or specialization relationship between the classes in case of public inheritance it implement "Is A" relationship and in private inheritance "Implemented in term of" relationship. Member of base class are available to child class.

Object Association

Its interaction of one class object with a objects of other classes.

Aggregation

It is specialize form of association. In this an object may contain collection of other objects, relationship between container and contained object is known as aggregation. Here every objects have their own life cycle but they are owned by other class and these objects can't be owned by any other class. Lets take an example of  Room, here room is parent class and its child classes are chair, table, bad and mirror. If any of child class is removed it will not affect other class. It is represented by blank diamond.
Some important point of aggregation
  • Relationship between objects are "Has A"
  • Every Object have independent life
  • Child Parent relationship

Commposition

It is specialize form of Aggregation. In this an object maybe compose of other smaller objects. Its the relation of "Part and Whole". It also known as Has A  relationship and it is represented by filled diamond. In this every child class does not have life cycle they are dependant on parent class. If parent class is deleted all child class will also deleted. Lets have an example, here Human body and body parts have relationship.
Some important points of commpositon
  • Strong Relationship
  • Only Parent have independent life cycle
  • Parent child relationship

Tuesday, 21 October 2014

Free Download Project Of Linked List In C++

Linked List Basic And Simple Program 

In this program user can have six functions to select. User can Add  Node In Beginning,  In Last  can display link list, user can delete the node from specific position and also can add node for specific position in linked list and user can reverse complete linked list, finally user will have exit option to exit program.   

Header Files For Linked List Function 

#include<iostream.h>
#include<stdio.h>
#include<stdlib.h>
#include<iomanip.h>   // For Set word

// structre for node

struct node{
    int value;
    node *next;
}*start=NULL;

int count=0;// Global Integer For Counting

// Function To Create Node In Link List (C++)

node* creatNode(int data)
{
    node *temp;
    temp= new node;  // Creating Node
    temp->value=data; //assiging value
    temp->next=NULL;
    return temp;
}

// Function To Add Node At Given Position In  Linked List C++

void addNode()
{
    int value,pos=0,key;
    node *temp=start;
    node *newNode;
    node *pre=start;
    if(start==NULL)
    {
        cout<<"Enter value:";
        cin>>value;
        temp=creatNode(value);
        start=temp;
        start->next=NULL;
        return;
    }
    cout<<"Enter Position To Add New Node:";
    cin>>key;
    if(pos==key)
    {
        cout<<"Enter value:";
        cin>>value;
        temp=creatNode(value);
        start=temp;
        start->next=pre;
        return;
    }
    else
    {
        int i=1;
        while(temp!=NULL)
        {   
            pre=temp;
            temp=temp->next;
            if(i==key)
            {
                cout<<"Enter value:";
                cin>>value;
                newNode=creatNode(value);
                newNode->next=temp;
                pre->next=newNode;
                return;
            }
            i++;
        }
    }
    cout<<"Node Position Is Not Available";   
   

}

// Function To Add Node At Beginning of Linked List C++


void insertBeg()
{
    int value;
    node *temp, *pre;
    cout<<"Enter value:";
    cin>>value;
    temp=creatNode(value);
    if(start==NULL)
    {
        start=temp;
        start->next=NULL;
    }
    else
    {
        pre=start;
        start=temp;
        start->next=pre;

    }

}

// Function To Add Node At Last of Linked List C++

void insertLast()
{
    int value;
    node *temp, *last;
    cout<<"Enter value:";
    cin>>value;
    temp=creatNode(value);//Storing addres of created Node
    if(start==NULL) // If there is no node
    {
        start=temp; 
    }
    else
    {   
        last=start;
        while(last->next!=NULL) // Checking Adress in Next
        {
            last=last->next;   //Moving Pointer to Last
        }
        temp->next=NULL; // To Make It Last
        last->next=temp;    // Connecting Last Node To New Node
    }
       

   

}



// Function To Delete Node From Linked List C++




void deleteNode(int num)
{
    int pos=1;
    node *temp, *pre;
    temp=start;            // assigning start node address to temp
    if(temp==NULL)   // Checking list is empty?
    {
        cout<<"*************List Is empty************";
        return;
    }
    if(num==pos)                    // If user want to delte first node
    {
        if(temp->next==NULL)    // checking that is first node is last?
        {
            start=NULL;        // List Will Become Empty
            cout<<"There Was Only One Node ... Now List Is Empty";
            return;
        }
        else
        {
            start=temp->next;
            return;
        }
    }
    while (temp!=NULL)
        {
            pos++;
            pre=temp;
            temp=temp->next;
           
            if(pos==num)
            {
                if(temp->next=NULL)
                {
                    pre->next=NULL;
                    cout<<"You Deleted Last Node Of Your List..."<<endl;
                    return;
                }
                else
                {
                    pre->next=temp->next;
                    return;
                }
            }
        }
}



// Displaying Linked List Function In C++

void display()
{
    node *temp;
    int num=0;
    temp=start;
    if(temp==NULL)
    {
        cout<<"Link List Is Empty...."<<endl;
        return;
    }
    cout<<"Node #"<<setw(10)<<"Value"<<endl;
    while(temp!=NULL)
    {
        cout<<setw(2)<<num<<setw(11)<<temp->value<<endl;
        temp=temp->next;
        num++;
        count++;
    }
    cout<<endl;
}


// Function Reverse Linked List C++

void reverse ()
{
    node *frw;
    node *pre=NULL;
    node *curent=start;
    while(curent!=NULL)
    {
        frw=curent->next;
        curent->next=pre;
        pre=curent;
        curent=frw;
    }
    start=pre;

}


// Main Function
int main ()
{
    int option,num;
    while(1)
    {
        system("CLS");
        cout<<endl;
        cout<<"*****Select Option********"<<endl;
        cout<<"* 1. Add In Begining     *"<<endl;
        cout<<"* 2. Add In Last         *"<<endl;
        cout<<"* 3. Display Link List   *"<<endl;
        cout<<"* 4. Delete Node         *"<<endl;
        cout<<"* 5. Reverse Node        *"<<endl;
        cout<<"* 6. Add Node At Nth Pos *"<<endl;
        cout<<"* 7. Exit                *"<<endl;
        cout<<"**************************"<<endl;
        cout<<"Enter Option From Above:";
        cin>>option;
        switch(option)
        {
        case 1:
            {
                insertBeg();
            }
            break;
        case 2:
            {
                insertLast();
            }
            break;
        case 3:
            {
                display();
                cout<<"\n Total Nodes"<<count;
                system("pause");
            }
            break;
        case 4:
            {
                display();
                if(start)
                {
                    cout<<"Enter Node Number To Delete:";
                    cin>>num;
                    deleteNode(num);
                    display();
                    system("pause");
                }
                else
                    system("pause");
            }
            break;
        case 5:
            {
                cout<<"Before Reverse"<<endl;
                display();
                reverse();
                cout<<"After Reverse"<<endl;
                display();
                system("pause");
            }
            break;
        case 6:
            {
                display();
                addNode();
            }
            break;
        case 7:
            {
                return 0;
            }
            break;
        default:
            cout<<"Invalid Option"<<endl;
        }
    }
}


If you have any issue regarding to this linked list program, please ask in the comment section.
Or if you have any question about linked list coding or other c++ programing issue post it here I will give you solution of your problem with explanation. 

E-mail Newsletter

Sign up now to receive breaking news and to hear what's new with us.

Recent Articles

TOP