Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
cptr142_group_project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jared Sexton
cptr142_group_project
Commits
e7a9191f
Commit
e7a9191f
authored
Mar 08, 2018
by
Jared Sexton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stabilizing MAIN
parent
964f8819
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
7 deletions
+19
-7
MAIN.cpp
MAIN.cpp
+5
-3
Student.h
Student.h
+10
-0
Teacher.cpp
Teacher.cpp
+3
-3
Teacher.h
Teacher.h
+1
-1
No files found.
MAIN.cpp
View file @
e7a9191f
...
...
@@ -35,12 +35,14 @@ int main() {
}
else
if
(
teacher
.
checkRoster
(
currentUser
)
>=
0
)
{
int
currentUserIndex
=
teacher
.
checkRoster
(
currentUser
);
// Current user (Student object) : teacher.roster.at(currentUserIndex)
Student
currentStudent
;
currentStudent
=
teacher
.
getStudent
(
currentUserIndex
);
// Current user (Student object) : currentStudent
// Insert Student Menu Here...
cout
<<
"Student Menu:
\n
"
;
teacher
.
setStudent
(
currentStudent
);
}
else
{
cin
.
clear
();
...
...
Student.h
View file @
e7a9191f
...
...
@@ -16,6 +16,10 @@ using namespace std;
class
Student
{
public:
// Default constructor
Student
()
{
userName
=
"NoName"
;
}
//Default constructor for only a username
Student
(
string
userNameIn
)
{
userName
=
userNameIn
;
...
...
@@ -27,6 +31,12 @@ class Student {
level
=
levelIn
;
}
// Copy constructor
Student
(
const
Student
&
studentIn
)
{
userName
=
studentIn
.
userName
;
level
=
studentIn
.
level
;
}
// Accessors
int
getLevel
()
{
return
level
;
...
...
Teacher.cpp
View file @
e7a9191f
...
...
@@ -233,7 +233,7 @@ const bool Teacher::getMenuActive() {
return
teacherMenuActive
;
}
const
student
getStudent
(
int
vectorPosition
)
{
const
Student
Teacher
::
getStudent
(
int
vectorPosition
)
{
return
roster
.
at
(
vectorPosition
);
}
...
...
@@ -246,6 +246,6 @@ void Teacher::setUserName(string userNameIn) {
userName
=
userNameIn
;
}
void
setStudent
(
Student
studentIn
)
{
roster
.
at
(
studentIn
.
checkRoster
(
))
=
studentIn
;
void
Teacher
::
setStudent
(
Student
studentIn
)
{
roster
.
at
(
checkRoster
(
studentIn
.
getUserName
()
))
=
studentIn
;
}
\ No newline at end of file
Teacher.h
View file @
e7a9191f
...
...
@@ -33,7 +33,7 @@ class Teacher {
const
string
getUserName
();
const
string
getExitCode
();
const
bool
getMenuActive
();
const
s
tudent
getStudent
(
int
vectorPosition
);
const
S
tudent
getStudent
(
int
vectorPosition
);
// Mutators
void
setExitCode
(
string
exitCodeIn
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment