Question: Specify and design a class 3D_Point that can be used to keep track of the position of a point in 3-dimensional space. Include member functions
Specify and design a class 3D_Point that can be used to keep track of the position of a point in 3-dimensional space. Include member functions to: set a point to specified location, to shift a point a given amount along the axes. Also, include non-member functions in the specifications to input 3-diemnsional points, output 3-diemnsional points as (X, Y, Z), and overload operators for == and !=.
Note that for the above class you are only responsible for the specification and design. You do not need to worry about its implementation. You will use these specifications to specify, design, and implement the class described below.
In 3-dimensional space, a line segment is defined by its two endpoints. Specify, design and implement a class for a line segment. The class should have two private member variables that are points from class 3D_Point. The member and non-member functions should be: (i) return the length of a line segment; and (ii) overload operator == to check if two line segments are equal.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
