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
Why was the first computer developed? a.) for personal use, b.) for military purposes, c.) for transportation, d.) for communica
IgorLugansk [536]
B) For Military Purposes but around the 1970s they became widely available to consumers.
5 0
3 years ago
HELP 10 POINTS
Masja [62]

Answer:

it's A:state the role each member played in the project

6 0
3 years ago
How do I change my keyboard's debounce time?
Zanzabum

in the control board type:

HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response\BounceTime

3 0
2 years ago
Read 2 more answers
what is the largest possible number of internal nodes in a redblack tree with black height k? what is the smallest possiblenumbe
Elina [12.6K]

Answer:

A Red Black Tree is a type of self-balancing(BST) in this tree ,each node is red or black colored. The red black tree meets all the properties of the binary search tree, but some additional properties have been added to a Red Black Tree.

A Red-Black tree's height is O(Logn) where (n is the tree's amount of nodes).

In a red-black tree with black height k

The maximum number of internal nodes is 2^{2k} -1.

The smallest possible number is 2^{k} -1.

7 0
2 years ago
04. Suppose a computer program needs to sort a list of student records in ascending order
34kurt

Answer:

D) ["Kathy Bones", "Jill Brewer", "Joe Schnook", "Tom Smith"]

Explanation:

The context of the problem explains a computer program that sorts names in "ascending order" (A to Z) since the ASCII table has capital A start a lower number and it increases from there to capital Z.

Notice how the attached file, which is a portion of the ASCII table, shows that letters after A are also higher in decimal value than the previous letter.

With this in mind, we know that all this program does is sort by last name alphabetical order. From there, just sort the given names using that same criteria, last name alphabetical order, and the correct answer is determined.

<em>Please put "Brainliest" on my answer if it helped you out!</em>

<em>If you want to learn more about this subject, you can search:</em>

<em>- ASCII Table</em>

<em>- Lists in Programming</em>

<em>- Sorting Procedures</em>

7 0
1 year ago
Other questions:
  • There are several reasons it’s important to use the right tool and the right size tool for the job, but the most important reaso
    8·1 answer
  • What effect does the interconnectedness of modern media have on society?
    14·2 answers
  • 2 ways to make your computer work faster ( please help asap )
    6·1 answer
  • Why do Selection Sort and Insertion Sort’s outer loops run 11 iterations if there are 12 elements in the array?
    7·1 answer
  • What is a mod in programming?<br><br> Give more Java questions
    12·1 answer
  • First person to make me laugh will get brainliest.​
    10·2 answers
  • Phân tích cạnh tranh của cocacola và pepsi
    5·1 answer
  • Drag the tiles to the boxes to form correct palrs.
    9·1 answer
  • How to mark a discussion as read on canvas dashboard.
    10·1 answer
  • failed logins or instances of denial of access to restricted files may be indicators of compromise. suggest where records of suc
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!