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
Mrs. Jackson wrote a newsletter to the customers of her housecleaning business that included some organizational tips they could
nika2105 [10]
The correct answer is a. effective communication

- - -
Ineffective and barriers to communication are problems that make communication unclear. Workplace communication is at work or at a job. This is not a job newsletter for workers, but for people at home.
5 0
3 years ago
Read 2 more answers
Help me please and thanks
Yuri [45]

Answer:

b

Explanation:

6 0
3 years ago
The following SQL statement uses a(n) _____. SELECT P_CODE, P_DESCRIPT, P_PRICE, V_NAME FROM PRODUCT, VENDOR WHERE PRODUCT.V_COD
Trava [24]

Answer:

The answer is c. “old-style” join.

Explanation:

SELECT P_CODE, P_DESCRIPT, P_PRICE, V_NAME

FROM PRODUCT, VENDOR

WHERE PRODUCT.V_CODE = VENDOR.V_CODE;

The SELECT clause represents all the columns to be displayed.

The FROM clause represents the tables which are used to extract the columns.

The WHERE clause shows the common column that exists in both the tables. This represents the old-style join when JOIN keyword was not used.

The tables are joined in two ways.

1. Using JOIN keyword

The syntax for this is given as

SELECT column1, column2

FROM table1 JOIN table2

ON table1.column3 = table2.column3;

This returns all rows from two tables having the same value of common column.

Two tables are taken at a time when JOIN keyword is used.

If more tables are to be used, they are mentioned as follows.

SELECT column1, column2

FROM table1 JOIN table2

ON table1.column3 = table2.column3

JOIN table3

ON table3.column4 = table1.column4

( ON table3.column5 = table2.column5 )  

The part in italics shows that the third table can either share the same column with table1 or table2.

The given query can be re-written using JOIN as shown.

SELECT P_CODE, P_DESCRIPT, P_PRICE, V_NAME

FROM PRODUCT JOIN VENDOR

ON PRODUCT.V_CODE = VENDOR.V_CODE;

2. Equating common column in WHERE clause

SELECT column1, column2

FROM table1, table2

WHERE table1.column3 = table2.column3;

This returns all rows from two tables having the same value of the common column.

Here, no keyword is used except the general syntax of the query. ON keyword as shown in the above example is replaced with WHERE.

Tables to be used are mentioned in FROM clause separated by commas.

Tables are joined based on the same column having same values.

Multiple tables can be joined using this style as follows.

SELECT column1, column2

FROM table1, table2, table3, table4

WHERE table1.column3 = table2.column3

AND table3.column5=table1.column5

AND table3.column4 = table2.column4;

5 0
3 years ago
How many units are considered a full time student at a community college in California?
Crazy boy [7]

Answer:

12

Explanation:

According to Saddleback college located in California;

12 units are considered full-time student status.

You may take as little as 0.5 units or as many as 19.0 units during a single semester. To take more than 19 units you are required to obtain special permission from the Counseling Department.

7 0
2 years ago
Scott does not use privacy settings on his social media
likoan [24]

Answer:

ARREST HIM!!!

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Respond to the following in three to five sentences. Select the workplace skill, habit, or attitude described in this chapter (a
    12·1 answer
  • Don't pat any attention to this
    7·2 answers
  • Create a style rule for the page body that sets the width to 95% of the browser window ranging from 640 pixels up to 960 pixels.
    11·1 answer
  • How will you apply what you have learned in our topic today in a real life situation? Show your answers in the acronyms provided
    6·1 answer
  • A(n) ____________________ is hardware or software that blocks or allows transmission of information packets based on criteria su
    13·1 answer
  • A group of computers that are interconnected in order to share information or documents is called what?
    13·1 answer
  • A computer consists of both software and hardware. a)Define the term software​
    5·1 answer
  • Is anyone a robIox moderator?
    13·2 answers
  • You saved a file on drive C go your computer. You want to find and open the file. Which of the following programs will you use t
    14·1 answer
  • In C++ please (read the image below for instructions)
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!