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

  Write java applet for costco gas station

Write a java applet for costco gas station. The applet will first ask you whether you are a costco customer, then the grade of gas you want to use: grade 87, 89, or 91.

  Need to create a pyramid with first name robert

Need to create a pyramid with first name Robert inside of a method named namePyramid and the print out to the console should look like this: Disregard the periods: I needed them to move the pyramid over

  Create to determine how much either joe or jim

What type of equation would you create to determine how much either Joe or Jim makes separately? What equation is needed in Java (ignoring the $ symbol)? What data type is needed need for this equation?

  Returns the object with the largest measure

public static Measurable maximum(Measurable[] objects)that returns the object with the largest measure. Use that method to determine the country with the largest area from an array of

  What purpose does the wbs serve

What purpose does the WBS serve? Describe the structure of a WBS. How does a WBS contribute to accurate estimates?

  The class constructor should accept an array

Write a class named TestScores. The class constructor should accept an array of test scores as its arguments. The class should have a method that returns the average of the test scores. If any test score in the array is negative or greater than 10..

  Write a method called negative sum

Write a method called negativeSum that accepts a Scanner reading input from a file containing a series of integers, and print a message to the console indicating whether the sum starting from the first number is ever negative

  Write a java loop

write a java loop ( of your choice ) that produces exactly the following output to the screen: 2-4-6-8-

  Create an application in which a user can enter a phone book

Create an application in which a user can enter a phone book entry, including the subsequent elements: First Name, Last Name, Phone Number, email address

  Write java dice program

write java dice program.

  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].

  Create a java class called watertank

Create a Java class called WaterTank.java. This program will simulate thedraining of a cylindrical water catchment tank. Your program will need to show how the rate at which water would exit the tank, assuming an output nozzle two inches (2") in d..

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