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
a986f3fc
Commit
a986f3fc
authored
Mar 01, 2018
by
Jared Sexton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected a typo
parent
90387d9a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
23 deletions
+36
-23
Question_driver.cpp
Question_driver.cpp
+16
-0
Questions.cpp
Questions.cpp
+8
-10
Questions.h
Questions.h
+12
-13
No files found.
Question_driver.cpp
0 → 100644
View file @
a986f3fc
/* ============================================================================
Question Class Driver
Jared Sexton
============================================================================
*/
#include "Questions.h"
#include <iostream>
using
namespace
std
;
int
main
()
{
Questions
questionList
;
questionList
.
countingQuestion
(
2
);
return
0
;
}
\ No newline at end of file
Questions.cpp
View file @
a986f3fc
...
...
@@ -4,29 +4,27 @@
============================================================================
*/
#include <iostream>
#include <cstdlib>
using
namespace
std
;
void
mainQuestionAsk
(
int
level
);
int
determineQuestion
(
int
level
);
bool
countingQuestion
(
int
level
)
{
int
countTo
;
switch
(
level
)
{
case
1
:
int
countTo
=
rand
%
5
;
countTo
=
rand
()
%
5
;
break
;
case
2
:
int
countTo
=
rand
%
10
;
countTo
=
rand
()
%
10
;
break
;
case
3
:
int
countTo
=
rand
%
20
;
countTo
=
rand
()
%
20
;
break
;
default
default
:
cerr
<<
"Please see your teacher about your current level."
;
break
;
}
...
...
Questions.h
View file @
a986f3fc
...
...
@@ -4,21 +4,20 @@
============================================================================
*/
#include <iostream>
class
Questions
{
void
mainQuestionAsk
(
int
level
);
int
determineQuestion
(
int
level
);
// Asks a question, returns true if the kid was right, false if they were wrong.
bool
countingQuestion
(
int
level
);
void
addSubQuestion
(
int
level
);
void
wordQuestion
(
int
level
);
public:
void
mainQuestionAsk
(
int
level
);
int
determineQuestion
(
int
level
);
// Asks a question, returns true if the kid was right, false if they were wrong.
bool
countingQuestion
(
int
level
);
void
addSubQuestion
(
int
level
);
void
wordQuestion
(
int
level
);
};
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