Computers and Technology
Computers and Technology, 28.09.2020 15:01, eme05

You are asked to implement the code that: ● Reads an input file containing integer values;
● Inserts the values into a sorted singly linked list. You can either create a linked list from
scratch by yourselves or use the Java standard library LinkedList class libraries. Both
approaches are acceptable.
● Reports minimum (referred to as ‘min’), maximum (‘max’), and median (‘med’) of the list
● Reports the time that it takes to:
○ insert all the values into the list (‘time_insert’)
○ find minimum of the list after all values are inserted into the list (‘time_min’)
○ find maximum of the list after all the numbers are inserted into the list
(‘time_max’)
○ find median of the list after all the numbers are inserted into the list (‘time_med’)
Your program should get through filename through one of two places:
1) The command line: java Benchmarking myFilename. txt
2) By prompting the user to enter a filename if no filename is provided on command line
It should open the file, read in the values to store in sorted order into the list, and should print
out the output numbers (min, max, med, time_insert, time_min, time_max, time_med) with
appropriate messages.
Note that the linked list should contain ‘sorted’ values at any point in time. Thus, you cannot
insert all the values into the list first and then try to sort the numbers. Instead, the list should
remain a sorted one after every insertion.
The timing statistics should be in seconds or milliseconds or microseconds (whichever gives the
closest precision to measure the actual time of the event). Now, it may so happen that if a
particular timed event's time is less than a second, your timer function will show 0 seconds.
Obviously this does not mean 0.0 seconds. It just means you need to measure the time at a
lower/finer resolution and use milliseconds or microseconds. If it turns out that the timed event is
smaller than a microsecond, then you can consider that time to mean really "0" seconds ‐ i. e.,
nothing to add to your timer variable


You are asked to implement the code that:

● Reads an input file containing integer values;
● Ins
You are asked to implement the code that:

● Reads an input file containing integer values;
● Ins

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 00:40, iamsecond235p318rq
To maintain clarity and focus lighting might be needed
Answers: 2
image
Computers and Technology, 24.06.2019 08:00, Maxxboogie
Can someone work out the answer as it comes up in one of my computer science exams and i don't understand the cryptovariables
Answers: 1
image
Computers and Technology, 25.06.2019 03:00, samanthaurso1
Between 1932 and 1938, chester carlson developed a process that enabled a "picture" of a document to be taken and then have it reproduced on another
Answers: 1
image
Computers and Technology, 25.06.2019 08:10, pinkpearl2022
Java and c++ are examples of languagehigh-level languagesmachine languagecompiler languages
Answers: 1
Do you know the correct answer?
You are asked to implement the code that: ● Reads an input file containing integer values;
●...

Questions in other subjects:

Konu
Mathematics, 20.05.2021 03:10