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

Please create the pseudocode, and then code, debug, and create the submittal fil

ID: 3866472 • Letter: P

Question

Please create the pseudocode, and then code, debug, and create the submittal files for Programing Challenge #1 and #2 on page 651 of your textbook. JUST ONE PROGRAM, PLEASE, that accomplishes the requirements of problems 1 and 2.

You can initialize the structure in main, but then you must pass the structure to a function that displays the data in a clearly formatted manner.

1. Movie Data Write a program that uses a structure named MovieData to store the following infor- mation about a movie: Title Director Year Released 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. 2. Movie Profit Modify the Movie Data program written for Programming Challenge 1 to include two additional members that hold the movie's production costs and first-year reve- nues. Modify the function that displays the movie data to display the title, director release year, running time, and first year's profit or loss

Explanation / Answer

NOTE: I have written the code in pseudocode but you have not mentioned which programming language it has to be coded. Could you please mention so i can program and share the same.

Pseudocode:

Declare Movie as Structure:

Declare title String,

Declare director String,

Declare yearReleased String,

Declare runningTime String,

Declare prodCost Real

Declare firstYrRev Real

Declare movieData1 Movie

Declare movieData2 Movie

movieData1.title <- 'the dark knight'

movieData1.director <- 'Christopher Nolan'

movieData1.yearReleased <- 'July 14 2008'

movieData1.runningTime <- '152 mins'

movieData1.prodCost <- 185000000

movieData1.firstYrRev <- 17000000

movieData2.title <- 'Avatar'

movieData2.director <- 'James Cameron'

movieData2.yearReleased <- 'Dec 10, 2009'

movieData2.runningTime <- '161 mins'

movieData2.prodCost <- 237000000

movieData2.firstYrRev <- 300000000

FUNCTION displayMovieData(movieRec)

Display "Movie Title is : ", movieRec.title

Display "Movie Director is : ", movieRec.director

Display "Movie Released year is : ", movieRec.yearReleased

Display "Movie Running time is : ", movieRec.runningTime

Display "Movie Production cost is : ", movieRec.prodCost

Display "Movie First Year Revenue is : ", movieRec.firstYrRev

IF movieRec.firstYrRev > movieRec.prodCost THEN

Display "Movie is running in Profits"

ELSE

Display "Movie is running in losses"

ENDIF

ENDFUNCTION

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote