Reference no: EM13308270
File processing
Write a Java for file processing according to the following rules. The program requested for this project must have a text menu like this:
0 - Exit
1 - Select file
2 - Display
3 - Reverse
Select option:
The menu is displayed and the user must select an option (a number between 0 and 3). The action corresponding to the selection is performed, then the menu is displayed again and the user can choose another option. This cycle is repeated until the user selects 0, which exits the loop and ends the program.
The options are:
0 - Exit
This options ends the program
1 - Select file
The user is prompted for a file name. This is the first options that must be selected by the user. All the options below are working on the file selected here. After performing several operations on the selected file, the user can select another file and work on it.
2 - Display
This option displays the content of the selected file on the screen. If no file was selected an error message is displayed.
3 - Reverse
The file is read into memory, all of it in one buffer, and the buffer is reversed, then the file is overwritten. For simplicity, we may assume that the maximum size of the file is 200000 bytes. If no file was selected an error message is displayed.
What is the fundamental frequency of the air column
: One of the harmonics of a column of air open at one end and closed at the other has a frequency of 448 Hz, What is the fundamental frequency of the air column
|
List the set of all possible combinations of vehicles
: The traffic that makes a left turnat an intersection consists of two types of vehicles, Type A andB. A type A vehicle is twice the length of the type B. THe left turn lane can accommodate ten vehicles of type B, five oftype A.
|
How many hits does the sequence exhibit
: Assume LRU replacement policy, for each sequence, how many hits does the sequence exhibit?
|
Define a 1-d array named people types
: Define a 1-D array named people Types that can store a maximum of 50 integer values that will be entered at the keyboard.
|
Write a java for file processing according to rules
: The file is read into memory, all of it in one buffer, and the buffer is reversed, then the file is overwritten. For simplicity, we may assume that the maximum size of the file is 200000 bytes. If no file was selected an error message is displayed..
|
Write a php script that computes the total cost
: Write a PHP script that computes the total cost of the ordered light bulbs from above after adding 6.2 percent sales tax. The program must inform the buyer of exactly what was ordered, in a table.
|
Write a java method called smallestindex
: write a java method called smallestIndex, which takes as its parameters a 1-d int array and its size, and returns the index variable of the smallest element in the array and the smallest element in the list. Write a java method that uses the metho..
|
Compute how many joules of energy does the battery lose
: A 12 V battery causes a current of 0.7A through a resistor. How many joules of energy does the battery lose in a minute
|
Write a function called class average
: Write a function called class Average that takes in an array of numbers and, after normalizing the grades in such a way that the highest corresponds to 100, returns the letter grade of the class average.
|