C++ Designing the HurdleState Class The HurdleState class is what we suggest you use to store all the information and data that represents the state of the game. You’ll have full control over how you want to represent the state of the game, and what information you want to store and allow to be modified. While you may implement the HurdleState class however you’d like, we suggest that you implement a non-default constructor that accepts a string, representing the secret Hurdle for the game. This will allow a HurdleState object to be instantiated with a new secret Hurdle when starting a new game. We suggest that the game state include, at the minimum: 1. The secret Hurdle 2. The words that have been guessed so far Refer to the Hurdle Backend API section below to see what must be returned by the Backend to the Frontend - this should help you decide what else is needed to be stored in the HurdleState class. hurdlestate.h file #pragma once #include #include #ifndef HURDLESTATE_H #define HURDLESTATE_H class HurdleState {  public:   //=================== YOUR CODE HERE ===================   // TODO: Add the constructor(s), accessors, mutators,   // and any other member function you may need here.   //======================================================   HurdleState(const std::string& answer);  private:   //=================== YOUR CODE HERE ===================   // TODO: Add any member variables you need here to store   // the state of the game. What information needs to be   // stored to fully represent the game state at a single   // point in time?   //====================================================== }; #endif  // HURDLESTATE_H hurdlestate.cc file #include "hurdlestate.h" // ========================= YOUR CODE HERE ========================= // This implementation file is where you should implement the member // functions declared in the header, only if you didn't implement // them inline in the header. // // Remember to specify the name of the class with :: in this format: //     MyClassName::MyFunction() { //        ... //     } // to tell the compiler that each function belongs to the HurdleState class. // ===================================================================

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

C++

Designing the HurdleState Class

The HurdleState class is what we suggest you use to store all the information and data that represents the state of the game. You’ll have full control over how you want to represent the state of the game, and what information you want to store and allow to be modified.

While you may implement the HurdleState class however you’d like, we suggest that you implement a non-default constructor that accepts a string, representing the secret Hurdle for the game. This will allow a HurdleState object to be instantiated with a new secret Hurdle when starting a new game.

We suggest that the game state include, at the minimum:
1. The secret Hurdle
2. The words that have been guessed so far

Refer to the Hurdle Backend API section below to see what must be returned by the Backend to the Frontend - this should help you decide what else is needed to be stored in the HurdleState class.

hurdlestate.h file

#pragma once

#include <string>
#include <vector>

#ifndef HURDLESTATE_H
#define HURDLESTATE_H

class HurdleState {
 public:
  //=================== YOUR CODE HERE ===================
  // TODO: Add the constructor(s), accessors, mutators,
  // and any other member function you may need here.
  //======================================================
  HurdleState(const std::string& answer);

 private:
  //=================== YOUR CODE HERE ===================
  // TODO: Add any member variables you need here to store
  // the state of the game. What information needs to be
  // stored to fully represent the game state at a single
  // point in time?
  //======================================================
};

#endif  // HURDLESTATE_H

hurdlestate.cc file

#include "hurdlestate.h"

// ========================= YOUR CODE HERE =========================
// This implementation file is where you should implement the member
// functions declared in the header, only if you didn't implement
// them inline in the header.
//
// Remember to specify the name of the class with :: in this format:
//     <return type> MyClassName::MyFunction() {
//        ...
//     }
// to tell the compiler that each function belongs to the HurdleState class.
// ===================================================================

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY