Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*USING C++ PROGRAMMING* TUTORIAL CHAPTER 4(STRUCT) Most of people especially teenagers like to watch movies in cinema. There are variety of movies available currently such

image text in transcribed

*USING C++ PROGRAMMING*

TUTORIAL CHAPTER 4(STRUCT) Most of people especially teenagers like to watch movies in cinema. There are variety of movies available currently such Avengers: The Endgame, Detective Pikachu, BTS: Burn the Stage, Paskal and etc. Each movie has its characteristics, which are title, genre, duration (in seconds) and classification (such as U,P13 and 18). 1. Write a struct definition for the movie based on the characteristics given. (1 Mark) 2. Create an array named MovieList to store 5 movies in main (1 Mark) 3. Write the function definition for each of the following : (3 Marks) a. Function inputData( ): This function receives two parameters; an array of movies and the size of the array. It then reads data from the user and stores them into the array. b. Function longestDuration( ): this function receives two parameters; an array of movie and the size of the array. It then determines and then display all information of the movie that has the longest duration. (5 Marks) c. Function Count(): This function receives two parameters; an array of movie and the size of the array. It then count how many movies that are classified as "18" then return the value to the main. (3 Marks) d. Write the main function : (2 Marks) i. Call inputData() fucntion to get the value form the user. ii. Call longestDuration( ) function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

2.5 Describe a social audit.

Answered: 1 week ago