Main4.java - import java.util.*; public class Main4 { /...

This preview shows page 1 - 2 out of 2 pages.

import java.util.*;public class Main4 {// create a private static data member of GRSData object// (You need to call the methods of GRSData when you find the average mark,median or//best student(s) of a modulepublic static void main(String[] argv) {if (argv.length != 2) {System.out.println("Usage: java Main4 {average | median |beststudent} module <module code>");System.exit(1);}// if the user wants to find the average mark of a module,// call the calculateModuleAverageMark method and show the result inDOS prompt// else if the user wants to find the median mark of a module,// call the calculateModuleMedian method and show the result in DOSprompt// else if the user wants to find the best students (may have more than1 best student) of a module,// call the displayBestStudent method// else show the message on how to run the program in DOS prompt and exit theprogram}public static double calculateModuleAverageMark(String mCode) {// return the average mark of a module (module code as inputparameter "mCode")}

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 2 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
NoProfessor
Tags
Subroutine, public class Main4

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture