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, 23.06.2019 00:10
Write a function so that the main0 code below can be replaced by the simpler code that calls function mphandminutes tomiles0. original main0 int main) l double milesperhour-70.0; double minutestraveled = 100.0; double hourstraveled; double milestraveled; hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; cout < "miles" 2 using namespace std; 4 /* your solution goes here/ 6 int maino 1 test passed 7 double milesperhour 70.0 all tests passed 8 double minutestraveled 100.0; 10 cout < < "miles: " < < mphandminutestomiles(milesper-hour, minutestraveled) < < endl; 12 return 0; 13
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
1. web and mobile applications allow users to be actively engaged in an online activity. a true b false 2. some examples of business applications purposes are to collaborate, share files, meet virtually in real-time, and accept payments. a true b false 3. an education application would most likely do which of the following? a allow users to watch popular movies and tv shows b connect users with social and business contacts c confirm users' travel plans d teach users a new language 4. a uniform resource locator (url) is how the internet knows where to take users when an address is typed into a browser. a true b false 5. deon is required to provide the citation information for his sources. what type of information should he collect from his sources? a author name, title, date of publication, date of access, url b connections to background information c interesting facts and statistics d notes on important information
Answers: 1
question
Computers and Technology, 24.06.2019 12:30
Do you think media is stereotype ? and why?
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
How do i change the size of my bookmarks in my bookmarks bar in google chrome? ? plz hlp me
Answers: 2
You know the right answer?
The unsorted list adt discussed in class (file “lecture_array_based_lists. pdf”) should be extended...
Questions
question
Mathematics, 11.07.2019 12:40
question
Mathematics, 11.07.2019 12:40
question
Mathematics, 11.07.2019 12:40
question
Chemistry, 11.07.2019 12:40
question
Mathematics, 11.07.2019 12:40
Questions on the website: 13722361