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]
4 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]4 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
Which are characteristics of a good topic sentence?
Pavlova-9 [17]
A good topic sentence provides the reader with an indication of what will follow in the rest of the paragraph.
It contains both a topic and a controlling idea or opinion. 
It is clear and easy to follow.
It does not include supporting details. It is to the point. 
A good topic sentences engages the reader by using interesting vocabulary.
I hope that this helps. 
Please mark Brainliest if you believe that I deserve so.
7 0
4 years ago
Select the correct answer
andrew-mc [135]

Answer:

C

Explanation:

because it helps edit and fix mistakes

7 0
4 years ago
Read 2 more answers
Write a C++ program using a do while loop for (Find the highest score). The program should work for any number of students. Run
alexdok [17]

Answer:

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.    int highest = 0;
  6.    int score;  
  7.    do{
  8.        cout<<"Input a score: ";
  9.        cin>>score;
  10.        
  11.        if(score > highest){
  12.            highest = score;
  13.        }    
  14.    }while(score >= 0);
  15.    
  16.    cout<<highest;
  17.    return 0;
  18. }

Explanation:

Firstly, create a variable highest and initialize it with zero (Line 5). Next, create a do while loop (Line 7 - 14). Within the loop prompt user to input a score (Line 8-9) and if the current score is higher than the highest variable, assign the score to highest variable (Line 11 - 13).

After finishing the loop when user put in any negative value, the program shall be able to print out the highest input score (Line 16).

8 0
3 years ago
List and describe two of the four generally recognized security positions.
Llana [10]
CISO: This person reports directly to the CIO and is responsible for assessing, managing, and implementing security.
Security Technician: Entry-level position and provides technical support to conFgure security hardware, implement security software, and diagnose and troubleshoot <span>problems</span>
8 0
4 years ago
What does the windows update feature allow you to do?
Mariulka [41]
The answer is D
Explanation: none
3 0
3 years ago
Read 2 more answers
Other questions:
  • To operate a vehicle in Florida, you must _____.
    9·2 answers
  • The scope of a variable declared within a for() loop is:
    6·1 answer
  • When is e-mail an appropriate channel for goodwill messages? If you frequently communicate with the receiver by e-mail and are c
    15·1 answer
  • Which of the following is the MOST likely cause of the connectivity issues?A user of the wireless network is unable to gain acce
    5·1 answer
  • JAVA Question!
    13·1 answer
  • B2B partners often connect to each other on the Internet through special __________ designed to facilitate information exchanges
    11·1 answer
  • Which of the following is not a data in python. float, integer, bool, str.​
    14·1 answer
  • Choose the correct climate association for: deciduous forest
    10·1 answer
  • When it comes to having certain sales skills as a hotel manager, being able to really hear, learn about, and show customers that
    10·1 answer
  • Mike logged into a shopping website and entered his username and password. Which protocol will the website use to verify his cre
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!