-
Notifications
You must be signed in to change notification settings - Fork 0
/
row_students.cpp
54 lines (43 loc) · 1.02 KB
/
row_students.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
49
50
51
52
53
54
//Tim Garvin
#include "row_students.h"
//Constructor implementation (Initialization of variables)
Row_Students::Row_Students()
{
next_row = NULL; //Initializes the next row class object to NULL
studentID = "-1";
firstName = "none";
lastName = "none";
}
//Returns the next row after the current one
Row_Students* Row_Students::get_nextRow()
{
return next_row;
}
//Returns the Student ID value of the current row
string Row_Students::get_ID()
{
return studentID;
}
//Returns the First Name value of the current row
string Row_Students::get_firstName()
{
return firstName;
}
//Returns the Last Name value of the current row
string Row_Students::get_lastName()
{
return lastName;
}
//Populates the current row
void Row_Students::set_currentRow(string ID, string fName, string lName)
{
next_row = new Row_Students(); //Allocates memory space for the next row class object
studentID = ID;
firstName = fName;
lastName = lName;
}
//Destructor
Row_Students::~Row_Students()
{
delete next_row;
}