Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Introduction The Java Collections Framework or JCF provides us with a Vector class which we can utilize to process a single column of data. Of

Introduction
The Java Collections Framework or JCF provides us with a Vector class which we can utilize to process a single column of data. Of course the Vector class is based upon a mathematical construct also called a vector. One might visualize a vector as a single column in a Microsoft Excel spreadsheet. We might be talking about thousands of entries, one after the other. A common way to store such data is in a relational database such as Microsoft Access or MySQL. When the data are stored in a relation or table in a relational database, it is relatively easy to query the data to obtain various statistical measures. It is also possible to warehouse data in a CSV or comma-separated values file. CSV files offer a mechanism to share data which might be processed in a variety of contexts. The JCF Vector class is applicable when one is tasked with processing large volumes of data. As it turns out, a conventional array is very similar to a Vector object. There is one important distinction. A Vector can grow and shrink as needed. A conventional array is fixed in size once it is declared. Keep in mind an array may be more appropriate in certain contexts rather than a Vector.
Discussion
Thinking back to the CSV file Download CSV fileand the provided Java application Download Java applicationto process the CSV file, why is it advantageous to place a reliance upon the Vector class instead of a conventional array of doubles? Consider the fact that Vectors can grow and shrink as needed, while once memory is allocated for an array, its size cannot change. Bear in mind we do not know how many temperature readings there are in the CSV file.
References
Official documentation on the Vector class, published by OracleLinks to an external site.
Official documentation on conventional arrays, published by OracleLinks to an external site.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

ISBN: 0132742926, 978-0132742924

Students also viewed these Databases questions

Question

Why is learning in the complex systems approach an ongoing process?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago