Colindapieman

hw11application

Apr 14th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. import java.util.Arrays;
  2. import java.util.Scanner;
  3. public class Application {
  4.  
  5. public static void main(String[] args){
  6. Scanner sc = new Scanner(System.in);
  7. System.out.println("Enter grades separated by commas. No spaces. Ex: 1,2,3");
  8. String input = sc.nextLine();
  9. ClassStorage storage=new ClassStorage(input);
  10. System.out.println("There are "+storage.getStudents()+" students.");
  11. System.out.println("The grades are: "+Arrays.toString(storage.getGrades()));
  12. System.out.println("The grades sorted are: "+Arrays.toString(storage.sort()));
  13. System.out.println("The mean is: "+storage.getMean());
  14. System.out.println("The median is: "+storage.getMedian());
  15. System.out.println(storage.getLetterGrades());
  16. sc.close();
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment