public boolean RemoveFranchise(int ID)
            throws UnauthorizedUserException, BadConnectionException, DoubleEntryException
    {
        PreparedStatement pStmnt = null;
        
        // cannot delete Franchise Number 1
        if(ID == 1)
            throw(new UnauthorizedUserException("AccessDenied"));
        
        try {
            // drop all Employees from the franchise
            code = dropEmployees(ID);
       
            int success = -1;
       
            if(code == 1) {
                pStmnt = con.prepareStatement(qs.delete_fran);
                pStmnt.setInt(1, ID);
                success = pStmnt.executeUpdate();
                if(success == 1)
                        return true;     
                if(success == 0 || success == -1)
                    return false;     
            }    
                else
                    throw(new BadConnectionException("BadConnection"));                   
        }
        catch(SQLException sqlE)
        {
            if(sqlE.getErrorCode() == 1142) {
                throw(new UnauthorizedUserException("AccessDenied"));
            }else { 
                throw(new BadConnectionException("BadConnection"));
            }
        }
        finally {
            try {
                if (pStmnt != null) pStmnt.close();
            }catch (Exception e) {};
        }
          
        return false;
    }