SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

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

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 6 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 30 Nov 2017 My Price 10.00

compiling the following java statement, every time to compile

I need help compiling the following java statement, every time I try to compile it I receive errors. I am using Code Runner.

import java.util.Scanner;
import java.io.IOException;
import java.io.FileReader;
import java.io.BufferedReader;
import java.util.Arrays;

/* ******************************************************************************
* ExamStatisticsProgram
*
* This program is designed to compute statistics on a list of exam scores read
* from a text file in response to a console prompt. The console program
* welcomes the user and asks for the name of the text file to input. The text
* file contains the number of scores followed by the list of scores. The
* program then computes and displays the following information to the console:
*
* The number of scores The minimum, maximum, and average scores The number of
* A, B, C, D, and F; using a 90-80-70-60 scale The median of the
* scores.
***************************************************************************** */
/**
ÿ* Created by johnacoakley on 5/28/17.
ÿ*/
public class ExamStatisticsProgram {

//declarations here?
String filename;
int score;
int A,B,C,D,F;
//private int min;
//private int max;
//private int avg;
int min,max, avg;
public static void main(String[] args)
{

// logic here?
ExamStatisticsProgram ep = new ExamStatisticsProgram();
Scanner sc = new Scanner(System.in);
System.out.println("Enter file name:");
ep.filename = sc.next();
int i=1;
int t=0;
try
{
BufferedReader br = new BufferedReader(new FileReader(ep.filename));
ÿÿ ÿ ÿ ÿ ÿ String sCurrentLine;
ÿÿ ÿ ÿ ÿ ÿ while ((sCurrentLine = br.readLine()) != null)
{
if(i ==1)
{
ÿÿ ÿ ÿ t = Integer.parseInt(sCurrentLine);
i =2;
} else {
ÿÿ ÿ ÿ ep.score = Integer.parseInt(sCurrentLine);
if (ep.score>= 90)
{ ep.A++; }
else if(ep.score>=80)
{ ep.B++; }

else if(ep.score>=70)
{ ep.C++; }
else if(ep.score>=60)
{ ep.D++; }
else
{ ep.F++; }
if( ep.min>ep.score)
{ ep.min = ep.score; }
if( ep.max<ep.score)
{ ep.max = ep.score; }
ep.avg = ep.avg + ep.score;
}
ÿÿ ÿ ÿ ÿ ÿ }
ÿÿ ÿ ÿ } catch (IOException e) {
ÿÿ ÿ ÿ ÿ ÿ e.printStackTrace();
ÿÿ ÿ ÿ }
ep.avg = ep.avg / t;
System.out.println("Minimum Score = " + ep.min);
System.out.println("Maximum Score = " + ep.max);
System.out.println("Average Score = " + ep.avg);
System.out.println("A Score = " + ep.A);
System.out.println("B Score = " + ep.B);
System.out.println("C Score = " + ep.C);
System.out.println("D Score = " + ep.D);
System.out.println("F Score = " + ep.F);

} // End Main
}
// All other methods declared and implemented here?
ExamStatisticsProgram()
{
filename = "C://esp.txt";
score = 0;
A=0;
B=0;
C =0;
D=0;
F=0;
min =999;
max =0;
avg =0;
}


Attachments:

Answers

(5)
Status NEW Posted 30 Nov 2017 11:11 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)