Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Write a program that stores the following data about a video game in a structure: Field Name Description title char array (name of game)

C++

Write a program that stores the following data about a video game in a structure:

Field Name

Description

title

char array (name of game)

genre

enum (type of game)

rank

int

time

float/double

This program will NOT need an array of structures. Instead, store the data in a file named games.dat. Your program will use a single structure variable to read/write a record as needed.

Your program should have a menu that allows the user to perform the tasks shown below.

Add a game.

Print the information for all games, in table form (does not need to be sorted).

Calculate and display the total time spent playing all video games.

Calculate and print the average rank for all games.

Edit the data (Extra Credit).

Your program should allow the user to make selections until they choose a 6th option Exit Program which will end the program.

Your program should be modular. Use a separate function for each option stated above. Your output should be well-organized, neat, and easy to read.

It should be able to print: Halo FPS 1 6 // for example of titlle, genere, rank, and days

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions