-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIntersection.cpp
48 lines (39 loc) · 1.28 KB
/
Intersection.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//* Author: Dhiraj Amarnani, Hassan Naveed, Andre Koppert
//* Date: December 18 2017
#include "Intersection.h"
#include <iostream>
using namespace std;
//*******************************************************************
//* Intersection()
//*
//* The constructor of our Intersection class. Creates a new empty
//* Intersection instance of our Intersection class. It does not take any
//* parameters and does not return anything.
//*
//*******************************************************************
Intersection::Intersection() : Section(){
//default value zero for time in use
timeInUse = 0;
}
//*******************************************************************
//* ~Section()
//*
//* The destructor of our Intersection class. It does not take any
//* parameters or return anything.
//*
//*******************************************************************
Intersection::~Intersection(){
}
//*******************************************************************
//* updateTimeInUse()
//*
//* This method updates the time in use of our intersection after
//* every call.
//*
//*******************************************************************
void Intersection::updateTimeInUse(){
//update time in use by decrementing one at every call.
if(timeInUse > 0){
timeInUse -= 1;
}
}