Write a program that stores dynamically allocated array of Movie (using calloc() function). Movie is the Structure with seven fields: name, genre (science fiction – action – drama/love), ticketPrices, list of actors/actresses, ratings(number of tickets sold), cost of production and profit.   In program implementation user enters the following:   Movie Name Movie1 Movie2 Movie3   Genre   Science Fiction   Action   Drama-Love   List of Actors /Actresses         Ratings(number of tickets sold)   720   750   300   Ticket Prices   $45.3   $50.2   $2.3   Cost of production   $5000.5   $7000.1   $100   Net Profit         -   Print the Movie names, list of actors/actresses, ratings(number of tickets sold), ticket prices, cost of production and the total net profit of each movie(net_profit_of_movie)   - Write a function that calculates the net_profit_of_movie; which is the multiplication of ticket prices and ratings(number of tickets sold), subtracted by cost of production    - In main     call        function,        print     all        movies’        information        and       the net_profit_of_movie to the console.    - Create a file called txt and write all movies information to the file, including the net_profit_of_movie per movie. -Ask the user to add more movies (use realloc). The user needs to write at least 1 more movie (e.g. movie 4) then get all information for the new movies from the user. Create a file called txt and write all movie data including the lately added movies’ data onto the file UpdatedMovies.txt.    - Write your firstname (Mohammad) at the top of the code. - Write explanatory comments for your code    please make sure the answer is correct 100%

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%
  1. Write a program that stores dynamically allocated array of Movie (using calloc() function). Movie is the Structure with seven fields: name, genre (science fiction – action

– drama/love), ticketPrices, list of actors/actresses, ratings(number of tickets sold), cost of production and profit.

 

  1. In program implementation user enters the following:

 

Movie Name

Movie1

Movie2

Movie3

 

Genre

 

Science Fiction

 

Action

 

Drama-Love

 

List of Actors

/Actresses

 

 

 

 

Ratings(number of tickets sold)

 

720

 

750

 

300

 

Ticket Prices

 

$45.3

 

$50.2

 

$2.3

 

Cost of production

 

$5000.5

 

$7000.1

 

$100

 

Net Profit

 

 

 

 

-   Print the Movie names, list of actors/actresses, ratings(number of tickets sold), ticket prices, cost of production and the total net profit of each movie(net_profit_of_movie)

 

- Write a function that calculates the net_profit_of_movie; which is the multiplication of ticket prices and ratings(number of tickets sold), subtracted by cost of production 

 

- In main     call        function,        print     all        movies’        information        and       the net_profit_of_movie to the console. 

 

- Create a file called txt and write all movies information to the file, including the net_profit_of_movie per movie.

-Ask the user to add more movies (use realloc). The user needs to write at least 1 more movie (e.g. movie 4) then get all information for the new movies from the user. Create a file called txt and write all movie data including the lately added movies’ data onto the file UpdatedMovies.txt

 

- Write your firstname (Mohammad) at the top of the code.

- Write explanatory comments for your code 

 

please make sure the answer is correct 100%

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education