Exercise to calculate intersection volume between two cubes
Design and start and application (or test project) which accepts as input dimensions and coordinates of two cubic objects (considering a 3D space). The application must determine whether the two objects collide and calculate the intersected volume. It's not a math exercise, so it is acceptable to consider the two cubes are parallel, so there is no rotation among themselves. The input coordinates define the center of the cube. The purpose of this exercise is to define the application design and architecture, focusing on the parts which ensure the correctness, performance and code clarity. Any design pattern is accepted and should be justified.