Question: Done in Java 1. Adding a function (static method) The functiors shwuld lewk like this: Btatic double geapte string gradej throws Exception f If passed

Done in Java
1. Adding a function (static method) The functiors shwuld lewk like this: Btatic double geapte string gradej throws Exception f If passed the arguneat "e 1 ", the function should retun the value 3.3. If passed the argument "g", the function abould return o. Eu'. 2. Adding a loop Your pogran $2 must allow the uxer do ingul any nurnher ul courses (not just five.) class. When run, the output of the progrum should look as follows (note the red rext is what the user types as the progran executes, not what the progran itself outputs): How many credits far class 2 (-1 to quit) 3 What grade did you get in class +i? B+ How many credits for cless t2? (-1 to quit) 4 nhat grade did you cet in class wiz B- How many credita for claas +3? (-1 to quit) 1 What grade did you get in class ti? A How many eredite for clase dAd? (-1 to quit) 3 What grade did you get in elass \$4? A How many aredita far class $5 ? (-1 to quit) 3 what grado did you get in class 55 ? + How many credits for class +62 (-1 to quit) 1 Your GPA is 3.33. Anciber example would be: How many credite for clase pli? (-1 to quit) 3 What grade did you get in elass Ni? A How many aredits far class \$2? (-1 to quit) -1 YaUI GPA iss 4.00. Anocber example woald be: How many credits for class \$1? (-1 to guit) 3 What grade did you get in class \#1? A How many credits for class \&2 (-1 to quit) 1 Your GPA is 4.00. 3. Handling bad inputs gracefully I lere's an exarnple of gracefully hamding had inputs: How many credits for class o1? (-1 to guit) 3 What grade did you get in class $1?0 I've never heard of getting a Q in a elass! Try again. What grade did you get in class \$1? Jay-z I've never heard of getting a Jay-z in a class! Try again. What grade did you get in clasa *1? D How many credits for clasa +27 (-1 to quit) stephen stephen is not a numer! please enter a number for the number of eredits. low many eredits for elass ? (-1 to guit) Davies Davies is not a number! Please enter a number for the number of credits. How many credits for class \&2? (-1 to quit) Hocks ROCKS is not a number! please enter a number for the number of eredits. How many credits for class \&2? {1 to guit) 4 What qrade did you get in clasa \&2? M I've never heard of getting a UNN in a clasal Try again. What grade did you get in clasa t2? Your GPA is 2.54. Special cuse
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
