GPA.java to calcalate GPA.
Z:>java GPA java GPA unit1 grade1 unit2 grade2 .... calculates the GPA. Z:>java GPA 3 A Your GPA is 4.0 Z:>java GPA 5 A 4 B Your GPA is 3.5555555555555554 Z:>java GPA 5 A 5 B Your GPA is 3.5 Z:>java GPA 5 A 5 B 2 D Your GPA is 3.0833333333333335 Z:>java GPA 5 A 5 B 2 D 3 C Your GPA is 2.8666666666666667 Z:>java GPA 5 A 5 B 2 D 3 C 5 A Your GPA is 3.15 |
Integer.parseInt(string) returns the integer value of the stringstring.charAt(0) returns the first character of the string/** Name: Charles Li * Student ID : 000 000 000 * PIC ID: ccli * E-mail: ccli@math.ucla.edu * Discussion: 1A * Assignment: hw1 * * I, Charles Li, pledge that this is my own independent work, which * conforms to the guidelines of academic honesty as described in the course * syllabus. * */