Starting from:
$35

$29

PROGRAM FOUR MOVIE DATABASE SOLUTION




DESCRIPTION:







You are completing a program for people who love movies and who own many of them. You are helping these people by organizing their movies in a movie database. Users should be able to read movie data from a file, save movies to a file, add a movie, delete a movie, edit a movie, print all movies, and delete all movies.







WHAT’S NEW IN PROGRAM 4







The biggest difference with this program besides working with pointers is that I am providing most of the code for you. This is a humongous program and there is no way that most students could write the entire program from scratch in this little amount of time. Therefore, you will have to understand the code I give you and then add the code that I specify in this document. You should not modify my code AT ALL unless specified in this document. It is an important programming skill to be able to take someone else’s code and understand it and expand on it.







MULTIPLE FILES







This program contains multiple files as described below




Text.h – header file for a structure version of the C++ String Class [do not modify this code]



Text.cpp – source file containing function definitions required for the structure version of the C++ String Class [do not modify this code]
Movie.h – header file for a Movie structure and functions that can be performed with the Movie structure.



Movie.cpp – source file containing the function definitions required for the Movie structure.



Movies.h – header file for a Movies structure and functions that can be performed with the Movies structure.



Movies.cpp – source file containing the function definitions required for the Movies structure.



Makefile – provided for you [if you do not have Windows you will not be able to use this]



runProgram.bat – provided for you [if you do not have Windows you will not be able to use this]



crockett_movie_data.txt – text file containing data on several movies that you can use to test your program


SPECIFICATIONS







You will need to read the comments and code provided for you. I placed a comment above most function prototypes describing what should be sent to the function, what the function returns, and what the purpose of the function is.




DO NOT CHANGE ANY OF THE ALREADY WRITTEN FUNCTIONS UNLESS STATED BELOW!!!!




Below is the list of functions that should be modified:










TEXT.H & TEXT.CPP







Do not make any changes to these files.







MOVIE.H & MOVIE.CPP










YOU WILL NEED TO ADD THE FOLLOWING FUNCTION PROTOTYPES IN MOVIE.H:




printMovieDetailsToFile()






YOU WILL NEED TO WRITE THE FOLLOWING FUNCTION DEFINITIONS IN MOVIE.CPP:




createMovie() – the overloaded version that contains ALL the movie data (not just title & length). This function should dynamically allocate a new movie. Then, assign parameter data to the structure members. Then, return a pointer to the new movie.



editMovie() – pay close attention to sample output to see how this function should behave. The element of the movie library movie that needs to be edited is sent to this function. You will need to display a menu that shows each type of data that can be edited. Then, display the current value of whatever the user chose. Then, allow the user to enter in a new value to replace the old one. Do not end this function until the user selects #8 (done editing) from the menu!






MOVIES.H & MOVIES.CPP










YOU WILL NEED TO ADD THE FOLLOWING FUNCTION PROTOTYPES IN MOVIES.H:




addMovieToArray()



readMoviesFromFile()






YOU WILL NEED TO WRITE THE FOLLOWING FUNCTION DEFINITIONS IN MOVIES.CPP:




removeMovieFromArray() - This function should be called when the user wants to remove one single movie from the movie library. The movie to be removed must be identified before calling this function because this function needs the element number (not the subscript/index number) of the movie to be removed. This function should release the dynamically allocated memory for the movie. Then, you must move all the array elements back one element so that there is not a blank element in the middle of the array. Then, make sure the last element that was moved is set to NULL. Don’t forget to decrement the current number of movies. Print a confirmation to the screen that the movie was deleted.



displayMovieTitles() – This function should print all the movie titles in the movie library.






DRIVER.CPP







Do not make any changes to this file.





























































































































































P a g e | 11

More products