Assemble the structure stiffness matrix [K] for the beam

Question
Assemble the structure stiffness matrix [K] for the beam shown below using element-based assemblage. Support B in Problem 2 and Support C in Problem 3 restrain movement in horizontal and

rotational directions. In practice, they are usually used to model sliders or fixed-connected collars:

Question image 1Question image 2Question image 3Question image 4