The difference in rectangle and cube is that a rectangle is a 2-dimensional figure where the length and the breadth of the geometry are specified.
A cube is a 3-dimensional figure where the length, breadth and depth of the geometry are specified.