Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago