Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Make a program that asks the user to input his/her grades for3 subjects. And als

ID: 3615473 • Letter: M

Question

Make a program that asks the user to input his/her grades for3 subjects. And also asks the user to input the number of units foreach of the 3 subjects. Then computes for the general weightedaverage (GWA) of the 3 subjects. And then tells the user ifhe/she fails or passes. The possible grades that the user can onlyinput are the following: 1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50,2.75, 3.00, 3.50. The user fails if she/he gets a GWA of 3.50. theuser passes if she/he gets a GWA of 3.00 or better. GWA is computed by:
  1. For each of the 3 subjects taken, multiply the numberof units by the corresponding grade;
  2. Add all the points and get the total; and
  3. Divide this total by the total number of units of the3 subjects taken.
sample output: grade for subject 1: 2.00 grade for subject 2: 1.50 grade for subject 3: 1.00 number of units for subject 1: 3 number of units for subject 2: 4 number of units for subject 3: 3 General weighted average: 1.50 pass Make a program that asks the user to input his/her grades for3 subjects. And also asks the user to input the number of units foreach of the 3 subjects. Then computes for the general weightedaverage (GWA) of the 3 subjects. And then tells the user ifhe/she fails or passes. The possible grades that the user can onlyinput are the following: 1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50,2.75, 3.00, 3.50. The user fails if she/he gets a GWA of 3.50. theuser passes if she/he gets a GWA of 3.00 or better. GWA is computed by: sample output: grade for subject 1: 2.00 grade for subject 2: 1.50 grade for subject 3: 1.00 number of units for subject 1: 3 number of units for subject 2: 4 number of units for subject 3: 3 General weighted average: 1.50 pass

Explanation / Answer

please rate - thanks your question has discrepancies! what is 3.0 to 3.5 pass or fail I'm assuming no arrays import java.util.*; public class untitled {public static void main(String[] args)    {double g1,g2,g3,avg;    int un1,un2,un3;    Scanner in=new Scanner(System.in);    System.out.print("grade for subject 1: ");    g1=in.nextDouble();    System.out.print("grade for subject 2: ");    g2=in.nextDouble();    System.out.print("grade for subject 3: ");    g3=in.nextDouble();    System.out.print("number of units for subject 1:");    un1=in.nextInt();    System.out.print("number of units for subject 2:");    un2=in.nextInt();    System.out.print("number of units for subject 3:");    un3=in.nextInt();    avg=(g1*un1+g2*un2+g3*un3)/(un1+un2+un3);    System.out.println("General weighted average:"+avg);    if(avg
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote