ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 13 Weeks Ago, 1 Day Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 08 May 2017 My Price 9.00

Write a noninteractive Java program

Write a noninteractive Java program (program should not expect any information from the user) that reads lines of input from a file with information about grades from a class. The input file consists of eleven lines with the following information:

  • ï‚·  Student ID Number, the student's identification number
  • ï‚·  Extra Credit, an integer representing the number of extra credit assignments turned in
  •   Grade, the percentage grade earned by the student Valid student ID's are integers in the range from 00000-99999 and must be 5 characters long, extra credit is an integer in the range from 0-5 and represents a 1% increase of the student's earned grade to compute the enhanced grade, and the grade is a real positive number in the range 00.00 to 100.00. The program will read in lines as input from the text file, accumulate summary data about the students while ignoring any line with any invalid data. The summary data will include information on the mean, mode, minimum, and maximum of the grades (both the earned grades and the enhanced grades), including the student ID of the students with the highest and lowest grades (both earned and enhanced). *NOTE: Do NOT use arrays, or other topics we have not yet taught. Use enough variables to save all the information for each student. For example:
     The following shows an example input file: 
  • 51673    0  98.85 
  • 19438   5  95.00 
  • 00483  3  73.16 
  • P1905   1   85.61 
  • 80463  2  73.16 
  • 76049  4  63.48 
  • 34086  7  90.23 
  • 13157   0   54.34 
  • 24937  2   81.03 
  • 26511   1    74.16 
  • 20034 4  103.90 
         Ignoring student with invalid ID number P1905
         Ignoring student 34086 with invalid extra credit 7
         Ignoring student 20034 with invalid grade 103.90
    

 

Mean Earned Grade:  77.15
          Mean Enhanced Grade:  79.15
            Mode Earned Grade:  98.85
          Mode Enhanced Grade:  75.16
         Minimum Earned Grade:  54.34 (student 13157)
       Minimum Enhanced Grade:  54.34 (student 13157)
         Maximum Earned Grade:  98.85 (student 51673)
       Maximum Enhanced Grade: 100.00 (student 19438)

 

Implement the following methods in the program:

  • ï‚·  public static void validateFile(File inputFile) – this method will read in the file location, if the input file does not exist it will give an appropriate error message and terminate the program.
  • ï‚·  public static void validateData(File inputFile) – this method will validate the data from the input file, if the data is valid it will save it appropriately and have the program ignore any lines of data which are invalid.
  • ï‚·  public static double mean(Boolean gradeType) – this method computes and returns the mean of all grades. If the passed boolean is false, it will compute for earned grades only, otherwise it will compute for enhanced grades.
  • ï‚·  public static double mode(Boolean gradeType) – this method computes and returns the mode of all grades. If the passed boolean is false, it will compute for earned grades only, otherwise it will compute for enhanced grades.
  • ï‚·  public static double min(Boolean gradeType) – this method computes and returns the minimum of all grades. If the passed boolean is false, it will compute for earned grades only, otherwise it will compute for enhanced grades.
  • ï‚·  public static double max(Boolean gradeType) – this method computes and returns the maximum of all grades. If the passed boolean is false, it will compute for earned grades only, otherwise it will compute for enhanced grades.
  • ï‚·  public static void printData() – this method will display the results to the screen, and uses the printf method to align the data as shown above. Run the program with the provided input file and capture all interaction in a file using the script command. 
  • Answer not updated yet as tutorial please new order thank you

Answers

(11)
Status NEW Posted 08 May 2017 05:05 AM My Price 9.00

Ans-----------wer----------- Fi-----------le-----------

Not Rated(0)