Server() // constructor
	{
    	/*
    	 * the constructor of the server class is basically doing 2 functions
    	 * 1) obtaining the ip address of the pc
    	 * 2) generating a 4 digit session id
    	 * 
    	 */
        serverObj=this;
        InetAddress i = null;
        OsCheck.OSType ostype=OsCheck.getOperatingSystemType();
        
        switch (ostype) {
	    case Windows:
			    	try {
						serverIpAddress=InetAddress.getLocalHost().getHostAddress();
					} catch (UnknownHostException e2) {
						// TODO Auto-generated catch block
						e2.printStackTrace();
					}
			    	System.out.println("windows");
			    	break;
	    case MacOS:
	    			System.out.println("MacOS");
	    			break;
	    case Linux: 
			    	Enumeration e = null;
			        try {
			            e = NetworkInterface.getNetworkInterfaces();
			        } catch (SocketException e1) {
			            // TODO Auto-generated catch block
			            e1.printStackTrace();
			        }
			        /* extracting the server ip address */
			        NetworkInterface n = (NetworkInterface) e.nextElement();
			        Enumeration ee = n.getInetAddresses();
			         i = (InetAddress) ee.nextElement();
			        i = (InetAddress) ee.nextElement();
			        serverIpAddress=""+i;
			    	System.out.println("Linux");
			    	break;
	    case Other:
	    			break;
        }
        
        
        char ip[]=serverIpAddress.toCharArray();
        if(ip[0]=='/')
        	serverIpAddress=new String(ip,1,serverIpAddress.length()-1);
        
        /*
         * the following while loop ensures that the server session id will be 
         * of 4 digits
         * 
         * now the server session id will be consisting exactly 4 digits
         */
        
        do
        {
        	serverSessionId=(int)(Math.random()*10000);
        }while(serverSessionId/1000==0);

       
    }