Derive a class TimedPosition to represent a kind of three-dimensional position that includes all of Position3D’s attributes and an additional attribute called time (an integer). Include a default constructor and a four-parameter constructor that initializes all four components. You may assume that a definition already exists for Position3D's three-parameter constructor.

What will be an ideal response?

```
class TimedPosition : public Position3D {
public:
TimedPosition() {}
TimedPosition( double, double, double, int );
private:
int time;
};
TimedPosition::TimedPosition( double xVal, double yVal, double zVal,
int timeVal )
:Position3D( xVal, yVal, zVal )
{
time = timeVal;
}
```

Computer Science & Information Technology

You might also like to view...

Describe a PoE injector.

What will be an ideal response?

Computer Science & Information Technology

In May of 2000, a French court ruled that ____ was in violation of French law because one of its Web sites allowed auctions of Nazi memorabilia.

A. Google B. Yahoo! C. AOL D. Microsoft

Computer Science & Information Technology