Text file containing the data

Assignment Help JAVA Programming
Reference no: EM13760286

In Java: This program should begin by asking the user for the name of a text file containing the data. Then...

This program should begin by asking the user for the name of a text file containing the data. Then read the data which will be a line containing the dimensions of a 2 dimensional array followed by a 2 dimensional array of ints. Then perform various operations (see the sample interaction below). Then replace the text file with the modified 2 dimensional array (with the file formatted the same way).

Sample input.txt file:

3 5
2 3 4 5 10
4 5 2 3 7 -
3 -1 0 1 5
Sample interaction 1:
Next command >
help
Legal commands:
show array
which rows sorted
which cols sorted
increase row i by n i
increase col j by n
quit Next command >
show array 2 3 4 5 10
4 5 2 3 7 -
3 -1 0 1 5
Next command > which rows sorted
Sorted rows: 0, 2
Next command >
which cols sorted
Sorted columns:
Next command > i
ncrease row 2 by 8
Next command >
increase col 4 by 1
Next command >
show array
2 3 4 5 11
4 5 2 3 8
5 7 8 9 14
Next command >
which cols sorted
Sorted columns: 0, 1

Next command >quit

Reference no: EM13760286

Questions Cloud

Create class named horse : in Java Create a class named Horse that contains data fields for the name, color, and birth year. Include get and set methods for these field. Next, create a subclass named RaceHorse, which contains and addtional field that holds the number of rea..
B-tree might be an elegant solution for the sorting : As you are working on finalizing the code for your solution, you are thinking that a B-Tree might be an elegant solution for the sorting and search algorithms. In order though to implement the solution in the most elegant fashion the use of recurs..
Develop the myclone class : You will also create another class of your choice. Your programmer-defined class should have at a minimum two instance variables and one method - You will create a Virtual World application as your final project. This Virtual World will have sever..
What might be some feasible solutions to the funding problem : Several million people visit these parks each year-an important part of the state's tourism. What might be some feasible solutions to the funding problems of the park system?
Text file containing the data : This program should begin by asking the user for the name of a text file containing the data. Then read the data which will be a line containing the dimensions of a 2 dimensional array followed by a 2 dimensional array of ints. Then perform variou..
Write an application that uses an array : Write an application that uses an Array to store 10 messages of type String. You can load this data structure with 10 messages of your choosing.
Computer and technology : Assume a program has 510 bytes and will be loaded into page frames of256 bytes each, and the instruction to be used is at byte 377. Answer the following questions:
Construct an appropriate chart : Construct an appropriate chart/graph that displays the relevant information for these two variables -  Write the null and alternative hypotheses used to test the question above (e.g., whether participation in the course affects writing scores).
Find an article in the library that relates to developing : Find an article in the library that relates to developing a project (program) charter and then summarize and discuss the article as well as describe based upon what you have learned how you would develop a program charter and merge the topic with the..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Given the following data definition classpublic class exam

given the following data definition classpublic class exam private static int totalpublic static void settotalint t

  Prepare a second class to test the receipt class

Prepare a second class to test the receipt class - Make this program using java programming. Make this application in simple way.

  Program will read parameters plaintext and ciphertextfrom

Specifically, your program will read parameters, plaintext and ciphertextfrom a file named "input.txt" (under the same directory).Then your program needs tocreate a file named "output.txt" (under the same directory) and prints the public key, private..

  Own file to test your program

Create your own file to test your program. Your job is to set up the input and output files to have the program read from a file and write to a file. Here is a basic program that will accomplish what is desired

  Modify the scholarship application

Modify the Scholarship application so that if a user enters a grade point average under 0 or over 4.0, or a negative value for either of the activities, an error message appears.

  Java program that will add the corresponding elements

Develop a Java program that will add the corresponding elements of two 1-dimensional arrays X and Y to produce the 1-dimensional array Z. Arrays X, Y, Z have the same dimension [M].

  A game of tic-tac-toe

A game of tic-tac-toe, two players (one the computer) take turns marking an available cell in a 3 X 3 grid (a two dimensional array) with their respective tokens (either and X or an O). When one player has placed three tokens in a horizontal

  Write a generic class called pair that stores two values

Write a generic class called Pair that stores two values of the generic type. It should have a constructor to set them, two methods getfirst()

  Create your own date class

You are to write a program that determines the day of the week for New Year's Day in the year 3000. To do this, you must create your own date class (MyDate) and use the following interface and main program:

  Prepare a class called geometrycalculator

Calculates the area of a circle of a given radius and write a class called GeometryCalculator that includes the subsequent methods

  Class to initialize values

Create a constructor that allows a user of the class to initialize values. Also create a method named SetJustSold()(Hint ++) that increments the number of hot dogs the stand has sold by one and should also increase the TotalSold by one

  Build distributed applications using technologies

Build distributed applications using technologies like Unix and Java sockets, SUN RPC, Java RMI, and message-passing tools such as PVM and MPI and

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