Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Purpose : To learn how to create, populate, and access a multidimensional array. Code a 2D array that will store the Oscar categories and the

Purpose: To learn how to create, populate, and access a multidimensional array. Code a 2D array that will store the Oscar categories and the winning film for that category in 2018. Once the array is populated, print the information. Code everything in the main(). Use printf(). Code your program according to the specifications below. There will be embedded for loops and an embedded if...else to determine the prompt. The if...else is in the nested for loop. When the loop-control variable for the column is 0, you'll prompt for the Oscar category; otherwise, you'll prompt for the winning film. Name the programYourLastNameFirstInitialLE63.java.

In the 2-dimensional array (table) below, assume the first row belongs to the first category and the second row belongs to the 2nd category and so forth where the first column is the Oscar category column and the second column is the film title column.

Best Picture The Shape of Water
Best Animated Feature Film Coco
Best Cinematography Blade Runner 2049

1st Prompt: This prompt will be repeated for each Oscar category where the 9 is 1, 2, or 3. Enter Oscar category 9: 2nd Prompt: This prompt will be repeated for each film where the X's is the Oscar category. Enter the film for Xxxxxxxxxxxxx: Output Specifications: The winning film will be printed for each Oscar category. The print for the header has to be outside of the for loops because it's printed only once. To successfully print the output, you will only loop through the 1st column in the nested for, and you'll use the column index plus 1 to access the film in the 2nd column. This will mean that the test expression for the column index will be 1 less the actual number of columns. Xs represent the Oscar category and film title.

OSCAR WINNERS 2018 Category: Xxxxxxxxxxxx Film: Xxxxxxxxxxxx Category: Xxxxxxxxxxxx Film: Xxxxxxxxxxxx

***END OUTPUT SPECS***

***SAMPLE OUTPUT***

Enter Oscar category 1: Best Picture

Enter the film for Best Picture: The Shape of Water

Enter Oscar category 2: Best Animated Feature Film

Enter the film for Best Animated Feature Film: Coco

Enter Oscar category 3: Best Cinematography

Enter the film for Best Cinematography: Blade Runner 2049

OSCAR WINNERS 2018

Category: Best Picture

Film: The Shape of Water

Category: Best Animated Feature Film

Film: Coco

Category: Best Cinematography

Film: Blade Runner 2049

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

Step: 3

blur-text-image

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

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

Students also viewed these Databases questions

Question

What are two ways a firm can restructure its finances?

Answered: 1 week ago