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
melamori03 [73]
2 years ago
8

Write a method named printGPA that takes in as a parameter a Scanner to read in user input, and calculates a student's grade poi

nt average. The user will type in input containing the student's name, then a number of scores, followed by that many integer scores. Then, the method will print out the average of all grades entered. Here are two example dialogues: Enter a student name: Maria Enter the number of courses: 5 Course 1 Grade: 72 Course 2 Grade: 91 Course 3 Grade: 84 Course 4 Grade: 89 Course 5 Grade: 78 Maria's grade is 82.8 Enter a student name: Jordan Enter the number of courses: 4 Course 1 Grade: 86 Course 2 Grade: 71 Course 3 Grade: 62 Course 4 Grade: 90 Jordan's grade is 77.25
Computers and Technology
1 answer:
KatRina [158]2 years ago
5 0

import java.util.Scanner;

public class JavaApplication40 {

   public static  void printGPA(Scanner scan){

       System.out.println("Enter a student name:");

       String name = scan.nextLine();

       System.out.println("Enter the number of courses:");

       int courses = scan.nextInt();

       double total = 0;

       for (int i = 1; i <= courses; i++){

           System.out.println("Course "+i+" Grade:");

           double grade = scan.nextDouble();

           total += grade;

       }

       System.out.println(name+"'s grade is "+(total/courses));

   }

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       printGPA(scan);

   }

   

}

I hope this helps!

You might be interested in
You should always keep a backup of data stored in the cloud because the cloud provider does not automatically do this True or fa
Art [367]

Answer:

False

Explanation:

8 0
3 years ago
What type of hardware enables users to interact with a computer? Check all that apply. the CPU the hard disk drive the keyboard
valentina_108 [34]

Answer:

the keyboard

the monitor

the mouse

Explanation:

just took test

6 0
3 years ago
Read 2 more answers
Whats the name of the windows 10 nucleus
stepan [7]

Answer:

motheboard

Explanation:

7 0
3 years ago
The three logical operators recognized by most search engines are
Kisachek [45]
The three basic logical operators recognized by the most search engines are AND, OR and NOT. They are known as Boolean operators. <span>You can use Boolean operators in keywords on the internet in both advanced and customs searches on many search engines.</span>




8 0
3 years ago
Jessica is working on a report for her art history class. She is using Microsoft Word for her report so that she can incorporate
Lana71 [14]

Answer:

Clicking the F4 button

Explanation:

The function keys or F keys are in most cases lined along the top of the keyboard and labeled F1 through F12. These keys act as shortcuts, performing certain functions.

The F4 button is a quick way to repeat the last command /action carried out.

For Jessica to continue applying this same style to additional headers, all she needs to do is click the Function Button F4 at the new location where she wants to apply Heading 1 Quick Style.

Other functions of the F4 button are:

  • Alt+F4 closes the program window currently active in Microsoft Windows.
  • Ctrl+F4 closes the open window or tab in the active window in Microsoft Windows.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Calls to the tostring( ) method emphasize the use of ____.
    12·1 answer
  • True or False: clicking ads and pop-ups like the one below could expose your computer to malware.
    11·2 answers
  • You can use the Ignore All button to ignore the current and all future occurrences of a flagged word. True or False
    5·1 answer
  • Componets of computer
    5·1 answer
  • PLEASE help me RIGHT NOW!!!!!!!!! I will give a Brainly to anyone who helps me!
    15·1 answer
  • _____________________ denotes the use of human interactions to gain any kind of desired access. Most often, this term involves e
    11·1 answer
  • What is one of the first power tools you’ll need as electrician
    15·1 answer
  • Speeding is one of the most prevalent factors contributing to traffic crashes.
    12·1 answer
  • I think my knee....
    14·1 answer
  • The unit we use to measure bending moment is...<br> A kg<br> B N<br> C Nm<br> D MPa
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!