1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Olenka [21]
3 years ago
13

Write a program that uses a structure named MovieData to store the following information about a movie: Title Director Year Rele

ased Running Time (in minutes) The program should create two MovieData variables, store values in their members, and pass each one, in turn, to a function that displays the information about the movie in a clearly formatted manner.
Computers and Technology
1 answer:
Len [333]3 years ago
7 0

Answer:

#include <iostream>

#include <string>

using namespace std;

struct MovieData {

string Title;

string Director;

unsigned short YearReleased;

unsigned short RunningTime;

};

void displayMovieInfo(MovieData &md) {

cout << "The Title is: " << md.Title << endl

<< "The Director is: " << md.Director << endl

<< "The Year of Release: " << md.YearReleased << endl

<< "The Running Time: " << md.RunningTime << " minutes" << endl;

}

int main() {

MovieData firtMovie, secondMovie;

firtMovie.Title = "Starship Troopers";

firtMovie.Director = "Paul Verhoeven";

firtMovie.YearReleased = 1997;

firtMovie.RunningTime = 129;

secondMovie.Title = "Alien vs. Predator";

secondMovie.Director = "Paul W. S. Anderson";

secondMovie.YearReleased = 2004;

secondMovie.RunningTime = 108;

cout << endl;

displayMovieInfo(movFirst);

cout << endl;

displayMovieInfo(movSecond);

cout << endl;

system("pause");

return 0;

}

Explanation:

In this program a structure that contains the class feilds for four attributes of a movie (Title, Director, Year Released and Running Time) we declared this with their appropriate data types.

Next we create a function (Method) called displayMovieInfo that will print a clearly formatted output of the movies when called and given appropriate parameters.

Finally we create the main function where we create two movie objects and make function calls to the displayMovieInfo and pass the two movies to the displayMovieInfo function to display their information

You might be interested in
Question 1<br> a node is.<br> •a sever<br> A Cell Phone<br> A Laptop<br> a device on a network
RSB [31]

Answer:

From Networkopoint of view, a node is a redistribution point or communication point or a connection point.

It can also mean devices or data points on a large network Such as laptop, phones, printers, etc

Explanation:

3 0
4 years ago
How is binary number related to real number?
Bogdan [553]

Answer:

.....................????..?..

7 0
3 years ago
Read 2 more answers
How did imperialism lead to WWI? A The debate of the morality of imperialism created tensions around Europe b Native people were
Sati [7]

Answer:

d. European nations competed and made alliances to control colonies.

Explanation:

The world War I was a period of battle between various countries from 1914 to 1918. It started formally on the 28th of July, 1914 and ended on the 11th of November, 1918.

Imperialism can be defined as a policy, ideology, or advocacy that sought to extend a country's power, dominion, authority and influence over another country through diplomacy, use of military force or colonization (direct territorial acquisition).

This ultimately implies that, imperialism is an advocacy or policy that is typically used to impose or extend a country's power, dominion, authority and influence. It simply means to seek colonies of other nations or countries.

Hence, imperialism led to WW1 because European nations competed and made alliances to control colonies.

In conclusion, there was an eagerness on the part of European Nations to gain colonial territories that were owned by other rival nations.

8 0
3 years ago
Why are cable networks such as mtv and cnn more profitable than the big four broadcast networks?
aalyn [17]
<span>Cable television was developed to deliver broadcast television signals to communities with poor reception.
</span><span>Cable networks such as MTV and CNN are more profitable than the big four broadcast networks because </span>viewers pay for subscriptions and companies pay for advertising. Viewer pay monthly fee for viewing cable TV and companies pay in order their campaign to be broadcasted.
8 0
4 years ago
By default, when will Google Analytics NOT be able to identify sessions from the same user?
AfilCa [17]
The correct answer is: When the sessions happen in different browsers on the same deviceSource, explanation and more answers: <span>https://goo.gl/oTkCk4</span>
4 0
3 years ago
Other questions:
  • Imagine a situation where two developers are simultaneously modifying three different software components. what difficulties mig
    11·1 answer
  • An attacker watches people as they enter a building requiring a key card. He waits until he sees someone who appears to be in a
    7·1 answer
  • A file containing user information which is transmitted from an online server and attached to your web browser and stored on you
    11·1 answer
  • Discuss FOUR challenges that have an impact on domestic tourism
    6·1 answer
  • Which module is missing from most expert systems? a. Knowledge base subsystem b. Inference engine c. User interface subsystem d.
    5·1 answer
  • An attribute that can have more than one value for each entity instance is referred to as:
    10·1 answer
  • Computer programming 5
    10·1 answer
  • A touch screen can be used as both an input device and output device. explain how this is possible
    10·1 answer
  • Forgot this website exsited wsp
    10·2 answers
  • Que compone una maquina Rube Goldberg (operadores mecánicos- maquinas simples – mecanismos)
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!