#### All Pages

Assignment Help Data Structure & Algorithms
##### Reference no: EM13698822

Question: We expect the file to contain grades represented by integer values, one per line. If you encounter a value that is not an integer, you should throw an exception, print a message to the console, skip that value, and continue processing. Store the grades that you read in an ArrayList so that all the grades are available for retrieval.

You should also have, as a minimum:

• A constructor with just one parameter, the file name
• Mutator
• Accessor
• toString().
• Method that return the highest grade
• Methods that return the grade average
• Method that return the lowest grade
• Method that return all the grades as an array of letter grades.

Test your class with a client class.

#### How to write a story into an array

Find a popular children's story and store it into an array. Prompt a user to search for a string within the array, returning the position of the search item within the array

#### Find method searches the haystack array

Write a class, ArraySearch that has two methods - The find method searches the haystack array to see if the elements within are the same, which is determined by the equals m

#### Algorithm to compute binomial coefficients

Analyze the time taken by this algorithm under the unreasonable assumption that the addition C(n-1, k-1) + C(n - 1, k) can be carried out in constant time once both C(n-1, k

#### Which algorithm should be most efficient

the test conditions are equal for both algorithms, which algorithm should be most efficient when N is arbitrarily large (i.e., you can select N to be as large as you want it

#### Use insertion sort on a randomly ordered array

Suppose that we use insertion sort on a randomly ordered array where items have only one of three values. Is the running time linear, quadratic, or something in between?

#### Draw the recursive process of quicksort

Draw the recursive process of Quicksort and Mergesort for sorting the sequence {5, 1, 2, 9, 7}. You will get a recursion tree for Quicksort and Mergesort respectively. What

#### Find a shortest-path from u to v

find a shortest-path from u to v, and we have a *valid* heuristic, i.e.: For every node w, we have a value a(w) such that the distance from w to v in G is at least a(w) for

#### Compute a shortest-path

Compute a shortest-path from u to v (instead of from u to all the nodes). One way to speed up Dijkstra's algorithm might be to run the algorithm u and from v at the same tim