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
What actions might contribute to recommendations you see online?
Virty [35]

Answer: what you search up

8 0
2 years ago
Abby has always dreamed of having her own ice cream shop. Now as a young entrepreneur she has decided to pursue her dream, but s
antoniya [11.8K]

Answer:

Abby LEE Miller UWUWUWUWUWWUUWUW

3 0
3 years ago
Google’s adwords system provides a quality score as a measure of _____, which indicates the usefulness of an ad message to consu
Vanyuwa [196]
The term that best fit the blank is RELEVANCE. The Google Adwords system is a system that is created by Google for the purpose of advertising online. Therefore, relevance is very important in this aspect as this shows how useful the ad is to the consumers who are doing the google search.
3 0
3 years ago
Access time is:________.
worty [1.4K]

Answer:

B) the time it takes for the required sector to position itself under the read/write head.

Explanation:

In Computer science, Access time is the time it takes for the required sector to position itself under the read/write head. It is usually measured in milliseconds.

It is the speed of the storage device.

5 0
3 years ago
To define an additional field in Datasheet view, tap or click the ____ column heading.
Ksenya-84 [330]
The correct answer for the question that is being presented above is this one: "D) click to add." To define an additional field in Datasheet view, tap or click the<span> click to add </span>column heading.
Here are the following choice:
A) insert field
B) blank field
C) new field
D) click to add
3 0
3 years ago
Other questions:
  • With a _____ network connection, the computers and other devices on the network are physically connected via cabling to the netw
    13·1 answer
  • You may nest while and do-while loops, but you may not nest for loops<br><br><br><br> True False
    10·1 answer
  • Will give brainliest!!<br> (Question 3)
    12·2 answers
  • A trust domain is defined as Select one: a. The agreed upon, trusted third party b. A scenario where one user needs to validate
    5·2 answers
  • Hi need help on this <br> what is cyberspace
    14·1 answer
  • Gray London is a retired race car driver who helped Dale Earnhardt, Jr. get his start. He is writing a book and making a video a
    9·1 answer
  • Computer science - algorithms - flowcharts
    11·1 answer
  • k-means clustering cannot be used to perform hierarchical clustering as it requires k (number of clusters) as an input parameter
    15·1 answer
  • Recommend how could you integrate positive aspects of digital literacy into your own
    13·1 answer
  • Guys, if I'm going back to 505 and it's a 7-hour flight or a 45-minute drive how do I get to 505?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!