Question: 17.4 Programming Assignment 4 - Structs and File I/O Problem: You are asked to create a program for storing the catalog of movies at a

17.4 Programming Assignment 4 - Structs and File I/O

Problem:

You are asked to create a program for storing the catalog of movies at a DVD store using functions, files, and user-defined structures. The program should let the user read the movie through the file, add, remove, and output movies to the file.

For this assignment, you must store the information about the movies in the catalog using a single vector. The vector's data type is a user-defined structure that you must define on functions.h following these rules:

  • Identifier for the user-define structure: movie.
  • Member variables of the structure "movie": name (string), year (int), and genre (string).

Note:you must use the identifiers presented before when defining the user-defined structure. Your solution willNOTpass the unit test cases if you do not follow the instructions presented above.

The main function is provided (you need to modify the code of the main function to call the user-defined functions described below).

The following user-defined functions are provided in the functions.h template file

printMenu:this function does not receive arguments and does not return a value. The function prints the options from the menu to STDOUT.

17.4 Programming Assignment 4 - Structs and File I/OProblem:You are asked tocreate a program for storing the catalog of movies at a DVDstore using functions, files, and user-defined structures. The program should let theuser read the movie through the file, add, remove, and output moviesto the file.For this assignment, you must store the information about themovies in the catalog using a single vector. The vector's data type

LAB 0 / 100 ACTIVITY 17.4.1: Programming Assignment 4 - Structs and File 1/0 Downloadable files input . txt Download input.txt - Notepad File Edit Format View Help Movie 1 1 Genre1 Movie 2 2 Genre2 Movie 3 3 Genre3 Movie 4 4 Genre4 Movie 5 5 Genre5LAB ACTIVITY 17.4.1: Programming Assignment 4 - Structs and File 1/0 0 / 100 Downloadable files input . txt Download Current file: functions.h Load default template... #ifndef FUNCTIONS_H 2 #define FUNCTIONS_H 3 4 #include 5 #include 6 #include 7 //include necessary libraries 8 9 using namespace std; 10 11 12 // Define the structure "movie" here 13 14 15 void printMenu() 16 17 cout : #include year; 24 cout ~ "Genre: "; 25 cin >> genre; 26 //call you addMovie() here 28 cout inputFile; 61 cout "Reading catalog info from " a inputFile as endl; 62 isOpen - //call you readFromFile() in here 63 if (isOpen - false) 64 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!