def generate_notification_message(pre_message, course, is_switching, is_success):
    """
    Generate a message by adding details onto pre_messaage
    :param pre_message: a String message
    :param course: a Course object
    :param is_switching: True if this is for switching section, False for registering into new course
    :param is_success: True if registration/switch was perform successfully
    :return: The final message with the necessary details
    """
    if is_switching:  # message for switching sections
        if is_success:
            pre_message += " You should now be switch into {0} from {1}.".format(course.name, course.current_registered_section)
        else:
            pre_message += " However, switching into {0} was unsuccessful. Make sure you are currently registered in a section " + \
                           "and there's no timetable conflicts.".format(course.name)

    else:  # message for registering into a course
        if is_success:
            pre_message += " You should now be registered into {0}.".format(course.name)
        else:
            pre_message += " But registration into {0} was unsuccessful. " + \
                           "Make sure you have all prerequisites and there's no timetable conflicts.".format(course.name)

    return pre_message