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
Aaron is stating the main idea of what he read in his own words. He is _____.
Feliz [49]

Answer:

summarizing

Explanation:

when someone explains in their own words the main idea of a story, it is summarizing.

8 0
2 years ago
Read 2 more answers
Pls answer will give brainlest dont answer if you dont know Upload your 300-word essay containing the following: the definition
Rainbow [258]

Answer: oh hello human :) also PLEASE DONT KILL ME I’m answering this because the question was already answered already on another post

6 0
2 years ago
C
storchak [24]

Answer:

B. THE LARGER THE NETWORK, THE MORE JOB LEADS AVAILABLE

Explanation:

  • BECAUSE THATS MY ANSWER, AND IM CORRECT WITH THAT

<h2>STUDY WELL</h2>
4 0
2 years ago
Knowledge of html and css is considered essential for the job of a(n _______.
7nadin3 [17]
<span>Knowledge of html and css is considered essential for the job of a web-designer. Html and css are useful if you want to build an informational web-site or landing page. Html is used for page structure and basic style. Css used for advanced styles, it helps you to make your web-site look prettier. If you want to make the advanced functions on your web-site, you should use javascript or php.</span>
4 0
2 years ago
What type of collection is created with each assignment statement?
lilavasa [31]

Answer:

tuple

Explanation:

at first its a dictionary but then it is reassigned to a tuple

don't forget tuples are immutable

7 0
2 years ago
Other questions:
  • Elena is used to kissing her friends on both cheeks as a form of greeting in her native country. She notices that her new friend
    6·1 answer
  • 2. What are the pros and cons of Toyota structure?
    13·1 answer
  • wHAT ARE THE 5 LAYERS in the internet protocol stack andwhat are the principal responsibilities of eack of theselayers.?
    12·1 answer
  • How would you classify an employee who is punctual, has respect for oneself and others, and takes initiative?
    13·2 answers
  • Which of the following is defined as the elastic leasing of pooled computer resource over the Internet? 1) Broadband 2) Wiki 3)
    13·1 answer
  • What are the missing whole numbers on this number line? Enter your answers in the boxes. plz show work I'm I need answer 3rd gra
    14·1 answer
  • How does this happen on brianly???
    5·2 answers
  • Importancia del sistema operativo
    6·1 answer
  • mary has access to certain resources because she is in the Research division of her company. She has access to other resources b
    15·1 answer
  • ________ helps in determining the cause of a security threat in an incident response plan. Question 7 options: A) Restricting sy
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!