How are cube and a rectangular prism alike? How are they different?

A rectangular prism can have unequal edge lengths. Cubes have all edge engths equal.

Both have only rectangular sides. The sides of cubes are, of course, squares.