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
MakcuM [25]
3 years ago
13

rite a function to prompt the user to enter the information for one movie (title, release date, mpaa rating and number of stars)

. This function should then return the movie information back to main. You should call this function twice, once for each of the MovieInfo variables in main.
Computers and Technology
1 answer:
vesna_86 [32]3 years ago
7 0

Answer:

import java.util.*;

public class Movie {

   

   public static void main (String [] args) {

       

       System.out.println(movieInfo());

       

   }

   public static String movieInfo() {

       Scanner input = new Scanner(System.in);

       Scanner input2 = new Scanner(System.in);

       

       System.out.print("Enter the title: ");

       String title = input.nextLine();

       System.out.print("Enter the release date: ");

       String releaseDate = input.nextLine();

       System.out.print("Enter the mpaa rating: ");

       double mpaaRating = input2.nextDouble();

       System.out.print("Enter the number of stars: ");

       double numberOfStars = input2.nextDouble();

       

       return "Title: "+title+ "\nRelease Date: "+releaseDate+ "\nMPAA Rating: "+ mpaaRating+ "\nNumber of Stars: "+numberOfStars;

   }

}

Explanation

- Create a function called <em>movieInfo()</em> that returns a string, information about a movie

- Ask the user to enter the title, release date, mpaa rating and number of stars of the movie.

- Return these values at the end of the function

- Inside the main, call the function to see the information about the movie

You might be interested in
Consider two sets S1 and S2 of size 3 and 2 each.
Brrunno [24]

Answer:

Answered

Explanation:

function from S_1 to S_2 (functions have unique mapping

each element in S_1 has 2 elements to map to in S_2 and there are 3 elements in S_1

therefore number of functions = 2^3 = 8 (2 choices for each of 3 elements)

a) relations between S_1 and S_2 are subset of S_1 x S_2

there are 6 elements in S_1 x S_2 therefore relations would be 2^6 = 64

(no of subsets of set of n elements = 2^n)

b) By above explanation functions from S_2 to S_1 = 3^2 = 9

 and relation from S_2 to S_2 = 2^4 = 16

7 0
3 years ago
How many of the colonists of Jamestown died before they made it to shore, due to the difficult voyage?
erma4kov [3.2K]
Almost all of the colonist of Jamestown died before they made it to shore, due to the difficult voyage.
8 0
3 years ago
Explain how can you protect your computer from malware
rosijanka [135]
Trend micro security for your Mac or pc or trend micro mobil security for your android or iOS Mobil device?

Hope this helps!
6 0
4 years ago
Read 2 more answers
Wow that funny a heck
lorasvet [3.4K]

Answer:

Seriously??? Omg - Orange Trump!!

3 0
2 years ago
you'll be organizing the various databases in your organization, and have recommended hiring a/an?A. internet specialist B. comp
jek_recluse [69]
Either c or d, most probably D
7 0
3 years ago
Read 2 more answers
Other questions:
  • 2. a. Write pseudocode for a divide-and-conquer algorithm for finding valuesof both the largest and smallest elements in an arra
    11·1 answer
  • How many apostrophes or quotation marks in a row should you use to begin and end a multi-line string?
    14·2 answers
  • Which type of denial of service attack exploits the existence of software flaws to disrupt a service?
    12·1 answer
  • Which technology forms the foundation for cloud computing? forms the foundation for cloud computing.
    12·2 answers
  • Implement RandMultipByVal function, which gets one integervariable as its argument
    12·1 answer
  • What are the characteristics of the sorting and grouping options in Outlook? Check all that apply. Columns can be sorted by clic
    15·2 answers
  • Bryan's company is new and has limited funds to work with. He has been tasked with finding a telecommunications technology that
    7·1 answer
  • Identify a characteristic that is a disadvantage of cloud-based hosting.
    11·1 answer
  • Difference between centralized and decentralized processing in computer
    7·1 answer
  • A user can add color to a database to highlight a modification. To do this with a macro, which command screen would you access o
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!