src/main/java/seedu/address/logic/commands/commandEdit/EditAssignmentCommand.java
private static Assignment createEditedAssignment(Assignment AssignmentToEdit,
                                                     EditAssignmentDescriptor editAssignmentDescriptor) {
        assert AssignmentToEdit != null;

        Name updatedName = editAssignmentDescriptor.getName().orElse(AssignmentToEdit.getName());
        Date updatedDeadline = editAssignmentDescriptor.getDeadline().orElse(AssignmentToEdit.getDeadline());
        Set<Tag> updatedTags = editAssignmentDescriptor.getTags().orElse(AssignmentToEdit.getTags());

        // fields that cannot edit
        ID id = AssignmentToEdit.getId();
        ID courseAssignedID = AssignmentToEdit.getAssignedCourseID();
        return new Assignment(updatedName, id, courseAssignedID, updatedDeadline, updatedTags);
    }
/**
     * Creates and returns a {@code Assignment} with the details of {@code AssignmentToEdit} edited with
     * {@code editAssignmentDescriptor}.
     */
Creates and returns a  Assignment with the details of  AssignmentToEdit edited with
editAssignmentDescriptor.
Creates and returns a Assignment with the details of AssignmentToEdit edited with editAssignmentDescriptor .
private static Assignment createEditedAssignment(Assignment AssignmentToEdit,
                                                     EditAssignmentDescriptor editAssignmentDescriptor) {
        assert AssignmentToEdit != null;
        Name updatedName = editAssignmentDescriptor.getName().orElse(AssignmentToEdit.getName());
        Date updatedDeadline = editAssignmentDescriptor.getDeadline().orElse(AssignmentToEdit.getDeadline());
        Set<Tag> updatedTags = editAssignmentDescriptor.getTags().orElse(AssignmentToEdit.getTags());
        ID id = AssignmentToEdit.getId();
        ID courseAssignedID = AssignmentToEdit.getAssignedCourseID();
        return new Assignment(updatedName, id, courseAssignedID, updatedDeadline, updatedTags);
    }
private static Assignment createEditedAssignment ( Assignment AssignmentToEdit , EditAssignmentDescriptor editAssignmentDescriptor ) { assert AssignmentToEdit != null ; Name updatedName = editAssignmentDescriptor . getName ( ) . orElse ( AssignmentToEdit . getName ( ) ) ; Date updatedDeadline = editAssignmentDescriptor . getDeadline ( ) . orElse ( AssignmentToEdit . getDeadline ( ) ) ; Set < Tag > updatedTags = editAssignmentDescriptor . getTags ( ) . orElse ( AssignmentToEdit . getTags ( ) ) ; ID id = AssignmentToEdit . getId ( ) ; ID courseAssignedID = AssignmentToEdit . getAssignedCourseID ( ) ; return new Assignment ( updatedName , id , courseAssignedID , updatedDeadline , updatedTags ) ; }
Creates and returns a {@code Assignment} with the details of {@code AssignmentToEdit} edited with
 {@code editAssignmentDescriptor}.
Creates and returns a { @code Assignment } with the details of { @code AssignmentToEdit } edited with { @code editAssignmentDescriptor } .
// fields that cannot edit