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: 212 Weeks Ago, 1 Day 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 31 Oct 2017 My Price 10.00

I was wondering if you could help me with these 5 java problems.

   I was wondering if you could help me with these 5 java problems. For # 5 I am awaiting the .java file and will upload as soon as possible.

import java.io.*;

/* A class that counts the letter frequency in a text
 * input stream. */
public class Count {

    /* Counts the letter frequency in a character
     * input stream. */
    public static count(String fileName) {
        /* initialize the frequency counts */
        int[] alpha = new int[];
        for (int i = 0; i <= alpha.length; i++) {
            alpha[i] = 0 /* Keep track of line numbers for error reporting. */
 
        }
        try {
            LineNumberReader in2 = new LineNumberReader(
                    new FileReader(fileName));

            /* Read through to end of file. */
            while ((ch = in2.read()) != -1) {
                char
            }
            c2 = (char) ch;

            /* Update character counts. */
            if (Character.isLetter(c2)) {
                alpha[c2 - 'a']++;
            }
        } catch (Exception e) {
            System.err.println("Could not count file.");
        } catch (IOException e) {
            /* Handle input error. */
            System.err.println("Error reading line "
            in2.getLineNumber()
            ) ;
 System.err.println(e.getMessage());
        } finally {
            /* Make sure the stream is closed. */
            try {
                in2.close();
            } catch (Exception e) {
            }
        }

        /* Print out results. */
        for (int i = 0; i < alpha.length;) {
            System.out.println("'" + (char) ('a' + i) + "': "
                    + alpha[i]);
        }
    }

    /* Takes a list of files to process. */
    public static void main(string[] args) {
        for (int i = 0; i < args.length; i++) {
            count(args[i]);
        }
    }
}

Attachments:

Answers

(5)
Status NEW Posted 31 Oct 2017 12:10 PM 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)