Question: could you answer this question as soon as possible, please. if anyone sees the answer to this please adjust it to make it more unique

could you answer this question as soon as possible, please.

if anyone sees the answer to this please adjust it to make it more unique

this is java language

could you answer this question as soon as possible, please. if anyone

sees the answer to this please adjust it to make it more

unique this is java language Exercise 2A [2%] Create a class call

TopographyArray. This class will be used to store data from topoValues.txt. Furthermore,

Exercise 2A [2%] Create a class call TopographyArray. This class will be used to store data from topoValues.txt. Furthermore, add a private two-dimensional array of type Object. Exercise 2B: Reading the data [4%] Add a constructor to the class. The constructor should receive a String as parameter that contains the name of the file. Add a method called readTopographyArray. This method should read the data from the file into the two-dimensional array you created in 2A. The first dimension should be equal to the number of rows in the file, the second to the number of (tab separated) columns. Exercise 2C Accessing the data [7%] Add the following functions to access the data. See the comments in the code below regarding the functionality that should be provided by your implementation. public String get Topography() { Construct a single string that contains all the electrode labels from the file in one line. Return this string. } public double getAngle(String label){ Get the angle of the electrode position defined by the label provided as a parameter. Make sure you do not take white space surrounding the label or capitalisation of the letters into account. */ public double getRadius (String label){ Get the radius of the electrode position defined by the label provided as a parameter. Make sure you do not take white space surrounding the label or capitalisation of the letters into account. public double getAmplitude (String label){ Get the amplitude at the electrode position defined by the label provided as a parameter. Make sure you do not take white space surrounding the label or capitalisation of the letters into account. / public String getClosestLabel (double angle, double radius) { Get the label closest to the angle and radius provided as parameter. Return this label as a string. Exercise 2D: User interaction (7%) Now create a class called MainExercise2 with a main() method. Add code to the main() method that will prompt the user to enter a 1 (numeric one) to print the electrode labels, a label to retrieve the corresponding angle, radius and amplitude, an angle and radius to retrieve the closest label or quit to quit. This prompt should query the user for new inputs until the user enters "quit". You should verify that the input is a valid and the choice of output should be derived from the input. An example of the output could look like this: Please enter: . 1 to print electrode labels . a label to retrieve angle radius and amplitude of this electrode . an angle/radius pair to retrieve the closest label . quit to quit. 12 Invalid input! THUU Ipuc. Please enter: - 1 to print electrode labels - a label to retrieve angle radius and amplitude of this electrode - an angle/radius pair to retrieve the closest label - quit to quit. F3 Retrieving anplitude for label F3... Angle: -39.947 Radius: 0.3446 Amplitude: 0.05663 Please enter: . 1 to print electrode labels . a label to retrieve angle radius and amplitude of this electrode . an angle/radius pair to retrieve the closest label 4 - quit to quit. 1 Printing electrode labels... FP1 FPZ FP2 AF7 AF3 AF4 AF8 F7 F5 F3 F1 FZ F2 F4 F6 F8 FT7 FCS FC3 FCI FCZ FC2 FC4 FC6 FT8 T7 C5 C3 C1 CZ C2 C4 C6 T8 TP7 CPS CP3 CP1 CPZ CP2 CP4 CP6 TP8 P7 P5 P3 P1 P2 P2 P4 P5 P8 PO7 P03 POS POZ P04 P06 P08 01 oz 02 Please enter: - 1 to print electrode labels . a label to retrieve angle radius and amplitude of this electrode . an angle/radius pair to retrieve the closest label . quit to quit. 45 0.5 Retrieving closest label to angle 45 and radius 0.5... F6 Please enter: - 1 to print electrode labels a tabel to retrieve angle radius and amplitude of this electrode - an angle/radius pair to retrieve the closest label quit to quit. quit Bye

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!