Accepts filename to sort and run

Assignment Help Basic Computer Science
Reference no: EM13165834

Description:

     Create a class called ExternalSort.

     Your class should have the following methods.  

   80 points
   a) public static <T extends Comparable<? super T>> void sort(T array[], int size)

          As it runs, it should print its progress as in this example:

             Writing runs of size 4.
             Merging to runs of size 8.
             Merging to runs of size 16.
             ...
             Done
          

   20 points
   b) public static void main(String args[])

          Accepts filename to sort and run size as command line arguments.
          Calls the sort routine.
          Writes the sorted result to a file named sorted.txt.

Reference no: EM13165834

Questions Cloud

Array named peopletypes that can store a maximum : Define a 1-D array named peopleTypes that can store a maximum of 50 integer values that will be entered at the keyboard. Enter a series of 1's, 2's, 3's and 4's into the array, where a 1 represents an infant, a 2 represents a child, a 3 represents..
A fuel economy study was carried out : A Fuel economy study was carried out for five models of cars. each car was driven 100 miles, and then the model of the car and the number of gallons used were placed in a line of the file Mileage.txt. Table 7.22 shows the data for the entries of t..
Make the circles have a thickness of 5 pixels, : Make the circles have a thickness of 5 pixels, except for the circle that didn't open at Sochi; make that one a solid disk.
Script that creates and calls a function : Write a script that creates and calls a function named fnItemTotal that calculates the total amount of an item in the OrderItems table (discount price multiplied by quantity)
Accepts filename to sort and run : Accepts filename to sort and run size as command line arguments. Calls the sort routine. Writes the sorted result to a file named sorted.txt.
Write in c++ another overloaded operator : Write in C++ another overloaded operator to go in the program that has Treasury. Overload the forward slash /  so that in the main program, you can declare sale to be of type Treasury, and commission to be of type Treasury, and commispctage to be of ..
Consider a version of the bounded buffer problem : Consider a version of the bounded buffer problem in which there is two producer processes (P1and P2) and one consumer processes (P3) all sharing the same buffer. Assume that the size of the buffer is n=4, and that we start with a completely empty buf..
What is the infinite union of all context-sensitive language : What is the infinite union of all context-sensitive languages? Decidable languages? What is the infinite intersection of all context-sensitive languages? Decidable languages?
Match the os mechanisms on the left to the hardware support : Match the OS mechanisms on the left to the hardware support specific for each mechanism on the right.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What ''are the differences between a policy, a standard

What 'are the differences between a policy, a standard, and a practice? What are the three types of security policies? Where would each be used? What type of policy would be needed to guide use of the Web? E-mail? Office equipment for personal use?

  System development methodologies in information systems

There are literally thousands of system development methodologies in the Information Systems field. Suggest some reasons why there might be so many.

  Describe nonrecursive method for finding by link hopping

Describe a nonrecursive method for finding, by link hopping, the middle node of a doubly linked list with header and trailer sentinels.

  Describing targeted audience go for particular site

Recognize a particular website that you frequently go to and explain targeted audience that goes to that particular site. Do not say "everyone" since all sites always have general target audience.

  Business rules that are reflected in the erd

Write the business rules that are reflected in the ERD shown below. (Keep in mind that the ERD reflects some simplifications. For example, this ERD states that each book is only written by one author, but in reality, there are many books written by m..

  Values referred to by ref-variables

Write expressions to compute the following functions of the values referred to by ref-variables x and y, which we shall assume refer to reals.

  List and describe three guidelines for sound policy

List and describe briefly the three guidelines for sound policy, as stated by Bergeron and Bérubé. Are policies different from standards? In what way? Are policies different from procedures? In what way?

  Why analyst needs to understand how people think

Describe why an analyst needs to understand how people think, how they learn, how they react to change, how they communicate, and how they work.

  Translate infix mathematical expression into postfix express

Write a program in java to translate infix mathematical expression into postfix expression and a program to evaluate the posfix expression. There should be three separate progams. use stack data abstraction and class implementation.

  Required value for the move command

Shape_index is a required value for the move command. It is the index of the shape in the shape data arrays that you wish to move. It should range between 0 and MAX_SHAPES - 1. Be sure to validate the index.

  Design the static method below to count

Design the static method below to count and return the frequency of each digit in the array of strings.

  Function that uses a switch statement

To locate nearest numbered cross street for a given avenue address, the following algorithm can be used: cancel last diget of the address, divide by two,

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd