"Files" Please respond to the following: •Suppose you are creating a program to monitor a vehicle’s location, a feature that a Global Positioning System (GPS) provides. Suggest one (1) method for saving and organizing the data you received from GPS so that you may analyze that data during the creation of the program in question. Provide a rationale to support your suggestion. •Using the scenario from Part I of this discussion, give your opinion as to why the Java language chooses to treat file data as a stream rather than as a single object, and specify the main benefits of this approach. Next, analyze the main reasons why the Java language chooses to treat file data as a stream rather than as a single object. Justify your response.
Data can be stored as a pair of coordinate Map<Pairs, place>. Pair is a simple class with coordinates as its element. This will help in quick lookup of a point and cooresponding location and will help in quickly performing search operation while analysing data.
why the Java language chooses to treat file data as a stream rather than as a single object,
Files can be very large more than even RAM size and loading such a big file is not always possible but streams can always be read in small chunks without running into memroy issues. This is the main reason for java to choose file as a stream rather than a single object.
Main benefit for this it helps your program not to crash while loading huge amount of data.
Get Answers For Free
Most questions answered within 1 hours.