-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmarine.cpp
More file actions
33 lines (30 loc) · 942 Bytes
/
submarine.cpp
File metadata and controls
33 lines (30 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/********************************************************************
* Name : Kevin Shaffer
* Student ID : 106069743
* Class : CSCI 2312-001
* HW# : 3
* Due Date : Sep 26th, 2017
* Description : Contain the implemntation of the Submarine class.
********************************************************************/
#include "submarine.h"
#include "position.h"
// Submarine::Submarine(Position::Coordinates coordinates, Position::Orientation orientation, unsigned int length) :
// WaterVehicle(coordinates, orientation, length) { }
unsigned int Submarine::GetDepth() const
{
return _depth;
}
void Submarine::SetDepth(unsigned int depth)
{
_depth = depth;
}
bool Submarine::IsSurfaced() const
{
return _depth == 0;
}
Submarine& Submarine::operator=(const Submarine& other)
{
if (&other == this)
return *this;
//return Submarine(GetCoordinates(), GetOrientation(), GetLength(), _depth);
}