Answered step by step
Verified Expert Solution
Question
1 Approved Answer
There is a file of a few movies that contains the following data: Date of release Movie name Production cost Gross profit Your assignment is:
There is a file of a few movies that contains the following data:
Date of release
Movie name
Production cost
Gross profit
Your assignment is: for each movie,
1. Without changing the data, read in the Date of release,
the Movie name, the Production cost and the Gross profit
for all of the movies and put the information into an array of structs (or classes).
2. Sort the array of movies by Movie Name alphabetically
3. Print the array of movies with a heading.
The fields should be printed in the following order:
Movie Name, Release Date, Production cost and Gross profit
4. Sort the array of movies by Percent Profit (Gross profit/Production Cost)
3. Print the array of movies with a heading.
The fields should be printed in the following order:
Movie Name, Production cost, Release Date and Percent Profit
The picture is the input file. Everything has to be written in C++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started