Write a java for file processing according to rules

Assignment Help Basic Computer Science
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.

Reference no: EM13308270

Questions Cloud

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.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Find the sum of the elements of an array called list1

Write a program to find the sum of the elements of an array called list1. The size of list1 is four bytes. The values of list1 are $FF, $1, $FE, and $02. To check your work, the sum should become $0200.

  Determine whether or not computers process numbers faster

Determine whether or not computers can process numbers faster and more efficiently than alphanumeric character data.

  What is meant by artificial intelligence

What is meant by artificial intelligence? What are two essential differences between human brains and the central processing unit of a computer.

  What is primary security risk users acknowledge using macros

Write a 200- to 300-word response that answers the following question: Based on the article by Lenning (2005), what is a primary security risk that users should acknowledge when using macros?

  A subroutine in marie assembly that multiplies two value

1)Write a subroutine in MARIE assembly that multiplies two values where the arguments for this subroutine are two pointers(each pointing to a value). The routine, multiply(a,b), performs *a x *b where a's value is the address storing the value being ..

  Organizing function of management

Discuss and explain the company function of management as it relates to at least two of the organizational resources:

  Evaluate the cost of materials

Evaluate the cost of materials

  Statistics about the numbers read

Write a function whose job is to input #'s, non-# to quit, recover from the input failure by calling recover(), and tell main some statistics about the numbers read. . unsigned readA();

  Design an employee class

Design an Employee class that has fields for the following pieces of information: Employee Name Employee Number Next, design a class named ProductionWorker that extends the Employee class.

  Write another implementation for the destructor

Write another implementation for the destructor that deallocates the linked list directly without calling pop.

  Business requirements drove the system''s initial development

Discuss how the business requirements drove the system's initial development.

  Write a python programs to solve

Write a Python programs to solve the following. Scientist measure an object's mass in kilograms and its weight in newtons. The equation is weight = mass * 9.8.

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