subject

The unsorted list adt discussed in class (file “lecture_array_based_lists. pdf”) should be extended by the addition of two new methods: 1. a method named merge that concatenates 2 unordered lists into a third. assume that list_1 and list_2 don't have any keys in common. the resulting list should be an unsorted list that contains all of the items from list_1 and list_2 (preserve the order).2. a method named split that divides a list into 2 lists according to a key. if list_1 and list_2 are the resulting lists, list_1 should contain all the items of the original list whose keys are less than or equal to the key passed and list_2 should contain all the items of the original list whose keys are larger than the key passed. next, create a client to test your program. the client should work with 3 sorted lists named list_1, list_2 and result. read the data for list_1 and list_2 from the files list1.txt and list2.txt (take input from user the names of the input files, handle the filenotfoundexception exception (try/catch) and consume unwanted input.) merge list_1 and list_2 into result and split result according to a key (input from the user). make sure you handle all possible errors. sample output: input the name of the file to be opened for first list: list1. input the name of the file to be opened for second list: list2.txtthe first list is: 13 25 34 67 56 10 20 27 2 5 1 45 59the second list is: 73 29 14 87 72 100 200 127 22 15 19 145 159 78the merged list is: 13 25 34 67 56 10 20 27 2 5 1 45 59 73 29 14 87 72 100 200 127 22 15 19 145 159 78enter key for split: 49the first list after split is: 13 25 34 10 20 27 2 5 1 45 29 14 22 15 19the second list after split is: 67 56 59 73 87 72 100 200 127 145 159 78for input files: list1.txt: 13 c v b 25 34 x x 67 56 10 a a 20 27 2 a s 5 1 45 59list2.txt: 73 29 c c c 14 87 72 100 200 c c c 127 22 15 19 c v v v 145 159 78

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
The "instance" relationship shows that something is an object of a
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 23.06.2019 01:50
Free points just awnser this. what should i watch on netflix
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
Consider the following function main: int main() { int alpha[20]; int beta[20]; int matrix[10][4]; . . } a. write the definition of the function inputarray that prompts the user to input 20 numbers and stores the numbers into alpha. b. write the definition of the function doublearray that initializes the elements of beta to two times the corresponding elements in alpha. make sure that you prevent the function from modifying the elements of alpha. c. write the definition of the function copyalphabeta that stores alpha into the first five rows of matrix and beta into the last five rows of matrix. make sure that you prevent the function from modifying the elements of alpha and beta. d. write the definition of the function printarray that prints any onedimensional array of type int. print 15 elements per line. e. write a c11 program that tests the function main and the functions discussed in parts a through d. (add additional functions, such as printing a two-dimensional array, as needed.)
Answers: 3
You know the right answer?
The unsorted list adt discussed in class (file “lecture_array_based_lists. pdf”) should be extended...
Questions
question
Law, 24.11.2020 16:20
question
Mathematics, 24.11.2020 16:20
question
Mathematics, 24.11.2020 16:20
Questions on the website: 13722367