174k views
5 votes
Create a java program that displays your local movie threatres film offerings. Include movie names (at least 5), show times and ratings (although you can add more) Information should be stored in variables and the display of the menu can use output statements. Incorporate conditions and user data in the program somehow to show me that you understand the concepts.

Create a java program that displays your local movie threatres film offerings. Include-example-1

1 Answer

6 votes

Final answer:

To create a Java program that displays local movie theaters' film offerings, use variables to store movie names, show times, and ratings.

Step-by-step explanation:

The correct answer is option Computers and Technology. To create a Java program that displays local movie theaters' film offerings, you can use variables to store movie names, show times, and ratings. Here's an example:

public class MovieTheater {
public static void main(String[] args) {
String[] movieNames = {"Movie 1", "Movie 2", "Movie 3", "Movie 4", "Movie 5"};
String[] showTimes = {"10:00 AM", "12:00 PM", "2:00 PM", "4:00 PM", "6:00 PM"};
String[] ratings = {"PG-13", "R", "PG", "PG", "G"};

for (int i = 0; i < movieNames.length; i++) {
System.out.println("Movie: " + movieNames[i]);
System.out.println("Show Time: " + showTimes[i]);
System.out.println("Rating: " + ratings[i]);
System.out.println();
}
}
}

This Java program defines arrays to store movie names, show times, and ratings. It then uses a for loop to iterate through the arrays and display the information for each movie.

This program incorporates variables, conditions (such as the loop), and user data (the movie names, show times, and ratings).

Iterate through the arrays and display the information for each movie using a for loop. This program incorporates variables, conditions, and user data.

User Seany
by
8.4k points