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]
3 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]3 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
Deborah believes that people of other nationalities are inferior to her. She treats them with disdain and does not miss an oppor
belka [17]
I recommend asking another category, not sure which one but computers and technology is not a good start. Keep looking and good luck!
3 0
3 years ago
Your boss asks you to send her the documents she needs for a critical meeting with important clients
Kaylis [27]

Answer:

O Walk them. After all, she is right down the hall.

3 0
3 years ago
Which is an example of a student practicing ethical behavior online??
professor190 [17]

Answer:

Zohar abides by his school’s Internet policy and does not visit questionable websites.

Explanation:

Only the first one is ethical behavior. The second choice is an example of plagiarism. The third & fourth choices could be examples of cyberbullying.  

4 0
3 years ago
Read 2 more answers
Question 8 of 10
Mama L [17]
The correct answer is A
7 0
2 years ago
Create a program that draws a rectangle whenever you click the mouse. The rectangle should have a width of 30 and a height of 50
Alinara [238K]

Answer:

RECT_HEIGHT = 50

RECT_WIDTH = 30

rect = Rectangle(50,30)

       

# random.choice returns a random value from the COLORS

# function will draw a rectangle at x, y

def draw_rect(x, y):

   rectangle = Rect(50, 30)

   rect.set_position(x, y)

   rect.set_color(Color.green)

   add(rect)

# Link to the mouse click event

   add_mouse_click_handler(draw_rect)

Explanation: Hope this works for you.

6 0
3 years ago
Other questions:
  • Is October tornado season?
    8·2 answers
  • What is the first step in planning a multi-table query?
    14·1 answer
  • How do you find the exterior angle measure of any regular polygon? (The degree in which to turn the turtle to draw a shape)
    10·1 answer
  • Discuss two things you want to know about driving
    12·1 answer
  • A ______ is a personal computer which stays in one location (e.g. office) due to its larger form factor.
    5·1 answer
  • What is a moves track
    5·1 answer
  • Identify two real-world examples of problems whose solutions do scale well
    13·1 answer
  • How did people figure qwerty keyboard set up, instead of the abcdef setup?
    13·1 answer
  • What type pf physical security devices lets a company locate devices that have been moved to a new location?
    12·1 answer
  • Which code snippet is the correct way to rewrite this in Semantic HTML?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!