c++ programming project assignment

Anonymous
timer Asked: Feb 7th, 2019
account_balance_wallet $50

Question Description

//

//Question.h

//Trivia

//

//Created by Hellen Pacheco on 10/15/18.

//Copyright © 2018 Hellen Pacheco. All rights reserved.

//

#ifndef Question_h

#define Question_h

#include <string>

using namespace std;

class Question {

private:

string question;

string answer1;

string answer2;

string answer3;

string answer4;

unsigned short int correctAnswer;

public:

Question();

Question(string question, string ans1, string ans2, string ans3, string ans4, unsigned short int correct);

void setQuestion(string question);

void setAnswer1(string ans);

void setAnswer2(string ans);

void setAnswer3(string ans);

void setAnswer4(string ans);

void setCorrect(unsigned short int correct);

string getQuestion();

string getAnswer1();

string getAnswer2();

string getAnswer3();

string getAnswer4();

unsigned short int getCorrectAnswer();

};

#endif /* Question_hpp */


Trivia Game

Implement the Question class that will be the base for a Trivia Game. The interface for this class is provided in question.h that you can download from ABOVE THE QUESTION. Implement all member functions in question.cpp, which you will turn in. You don't have to turn in question.h since I already have it. Please note that it is important that you do not change question.h or I won't be able to compile your program.

Create a program (in main.cpp, which you will turn in) that implements the trivia game. The program should create an array of 10 Question objects, one for each trivia question. Make up your own trivia questions on the subject or subjects of your choice.

To learn how to create and access arrays of objects, refer to section Arrays of Objects in your textbook (13.12 in 9th edition). There is a great example that you can follow there.

Your game should present the user with the 10 questions in a way that you like. How you will present the questions and in which order is up to you, but make sure to follow these requirements:

  • the interface is friendly, not cluttered, with clear directions (ask someone to play your game to see if it is easy to follow)
  • the user is informed whether the answer they enter is right or wrong. If wrong, let them know what the correct answer is.

Turn in: question.cpp and main.cpp

Rubric

Lab3 rubric

Lab3 rubric

CriteriaRatingsPts

This criterion is linked to a Learning OutcomeDocumentationFollows guidelines.

5.0 pts

Full Marks

0.0 pts

No Marks

5.0 pts

This criterion is linked to a Learning OutcomeQuestion class implementationImplements all member functions appropriately.

20.0 pts

Full Marks

0.0 pts

No Marks

20.0 pts

This criterion is linked to a Learning OutcomeGameThe game is interesting, directions are clear, output is clean, not cluttered. Make sure to inform the user of what is happening at all times.

20.0 pts

Full Marks

0.0 pts

No Marks

20.0 pts

This criterion is linked to a Learning OutcomeStructureCode does not look cluttered, is well indented and there are no global variables or goto statements.

5.0 pts

Full Marks

0.0 pts

No Marks

5.0 pts

Total Points: 50.0


Tutor Answer

criss53
School: Carnegie Mellon University

Here...

flag Report DMCA
Review

Anonymous
Tutor went the extra mile to help me with this essay. Citations were a bit shaky but I appreciated how well he handled APA styles and how ok he was to change them even though I didnt specify. Got a B+ which is believable and acceptable.

Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors