Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

movie.txt file includes 7 Spectre 7.3 70400000.00 The Martian 8.2 198500000.00 T

ID: 3762127 • Letter: M

Question

movie.txt file includes

7

Spectre 7.3 70400000.00

The Martian 8.2 198500000.00

The Peanuts Movie 8.1 27000000.00

Goosebumps 7.0 31000000.00

Bridge of Spies 8.0 55900000.00

Burnt 6.7 10800000.00

Hotel Translyvania 2 7.0 161700000.00

hi i need some help with this program. Thanks so much in advance.

Use the input file provided (movies.txt). This file has a number (the number of movies in the file), a title, rating, and box office profit. Using object oriented design, write a program that uses a class called Movie that has title, rating, and profit data members. Create an array of movie objects in your main function. Fill the array from the file movies.txt. Your program should then prompt the user for his or her choice, then execute that choice. The choices are below - each should be a function in your main - you will need methods to access the data member fields of the movie object. 1) FindMovieRating: Allow a user to enter a movie name and find its rating. 2) FindHighestMovieRating: Print the movie with highest user rating 3) FindHighestBoxMovieOffice: Find Movie with highest box office rating 4) PrintAll: Print all the movies in the array as well as their rating and profits Turn in a screen shot of your output testing each of these functions

Explanation / Answer

#include #include #include using namespace std; struct movies_t { string title; int year; } mine, yours; void printmovie (movies_t movie); int main () { string mystr; mine.title = "2001 A Space Odyssey"; mine.year = 1968; cout yours.year; cout