Question: Create a Game structure Have it contain fields to hold the following values Name Type (e.g. it may hold something like: card game, board game,

 

  • Create a Game structure
    • Have it contain fields to hold the following values
      • Name
      • Type (e.g. it may hold something like: card game, board game, TTRPG, chance, etc.)
      • Minimum player count
    • Make sure the datatypes are correct
  • In the main
    • Create 2 different variables that are of the type as defined above
    • Fill the 2 variables with the required information (data in each field)
    • Use the variables by displaying all of the information stored. Make it easy to understand what is being displayed (user experience)

Part 1a

  • Create a book class
  • Create a movie class
  • Create an instrument class
  • Create a school class

Part 1b

In the main have the following occur

  • Create 3 objects to record the schools you went to (myElementary, myHighschool, etc.)
  • Create 2 objects to store different books that you have read
  • Create 4 objects to store movies you have watched


Make sure the variable names are descriptive. book1, book2, etc. mean nothing.

Part 2

For the following fields: use the public keyword.

  • In the school class add fields to hold the school name, the city it is found in and level of the school (elementary, high school, graduate school, etc.)
  • In the movie class add fields to hold the movie name and release date
  • In the book class add fields to hold the book title, author and page count
  • In the instrument class add fields to hold the name (type) of the instrument and state (e.g. old, new, used, rusty, broken)
  • In the instrument class add a method
    • called Play
    • returns nothing
    • has no parameters
    • displays "A melodious sound is created!" in the console

Part 3

  • In the main
    • Populate one of the schools, one of the books, and one of the movies with data to show you filling the fields with data
    • Create an object to hold an instrument
    • Play the instrument
    • Now display all the book's, school's and movie's fields to the console.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a C code structure to fulfill the requirements include iostream include string Game structure ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!