Add the code of the ArrayListType to your code. Part 2: Create an Ordered_List class derived from the ArrayListType then add the following function to this class: • Constructor to create an array of the size specified by the parameter size. The default array size is 20. • Sorted Insert this function takes an integer values then add it to the list this function should check whether the value exist in the list or not. If it is already exist then it will not be inserted to the list, this function should keep the list ordered. • Remove function to remove an item from the list. The function takes a single parameter that specifie
Add the code of the ArrayListType to your code. Part 2: Create an Ordered_List class derived from the ArrayListType then add the following function to this class: • Constructor to create an array of the size specified by the parameter size. The default array size is 20. • Sorted Insert this function takes an integer values then add it to the list this function should check whether the value exist in the list or not. If it is already exist then it will not be inserted to the list, this function should keep the list ordered. • Remove function to remove an item from the list. The function takes a single parameter that specifie
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
![Part 1:
Add the code of the ArrayListType to your code.
Part 2:
Create an Ordered_List class derived from the ArrayListType then add the following function to this class:
Constructor to create an array of the size specified by the parameter size. The default array size
is 20.
Sorted Insert this function takes an integer values then add it to the list this function should
check whether the value exist in the list or not. If it is already exist then it will not be inserted to
the list, this function should keep the list ordered.
Remove function to remove an item from the list. The function takes a single parameter that specifies
the number to be removed.
• Sequential Search a function to search the list for an integer if exist return its location otherwise
return -1. This function specifies the number we are looking for as a parameter.
Part 3:
Implement the following non-member functions to deal with the Ordered List objects:
Load file: this function should read a text file consist an integer numbers then add them to the object
passed as argument to the function. Use the following prototype
void Load File (Ordered List &list1):
Store data: this function should store the list from an object of Ordered List class to a new text file.
Use the following prototype
void Store_Data (Ordered_List list1);
Duplicate this function should multiply each number in the list by 2 and update the list with the new
values. Use the following prototype
void Duplicate (Ordered_List &list1);
Remove this function should take an integer number as a parameter and delete all its multiples from
the list.Use the following prototype
void Remove (Ordered_List &list1 , int val);
Separate this function should separate the numbers from an object to a tow new lists one for ODD
numbers and one for EVEN numbers. Use the following prototype
void Separate (Ordered_List list1, Ordered_List &ODD, Ordered_List &EVEN)
Part 4:
Write a menu driven program that allow the user to perform the flowing options:
1) Load file
2) Add new number
3) Duplicate numbers
4) Remove multiples of 3
5) Separate odd and even
6) Store list
7) Exit](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fcce4f75a-c13a-40f1-8dc9-f372830d4953%2F0d496b0b-de9f-4aa2-86e7-13182af59b49%2Ffyzqp1e_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Part 1:
Add the code of the ArrayListType to your code.
Part 2:
Create an Ordered_List class derived from the ArrayListType then add the following function to this class:
Constructor to create an array of the size specified by the parameter size. The default array size
is 20.
Sorted Insert this function takes an integer values then add it to the list this function should
check whether the value exist in the list or not. If it is already exist then it will not be inserted to
the list, this function should keep the list ordered.
Remove function to remove an item from the list. The function takes a single parameter that specifies
the number to be removed.
• Sequential Search a function to search the list for an integer if exist return its location otherwise
return -1. This function specifies the number we are looking for as a parameter.
Part 3:
Implement the following non-member functions to deal with the Ordered List objects:
Load file: this function should read a text file consist an integer numbers then add them to the object
passed as argument to the function. Use the following prototype
void Load File (Ordered List &list1):
Store data: this function should store the list from an object of Ordered List class to a new text file.
Use the following prototype
void Store_Data (Ordered_List list1);
Duplicate this function should multiply each number in the list by 2 and update the list with the new
values. Use the following prototype
void Duplicate (Ordered_List &list1);
Remove this function should take an integer number as a parameter and delete all its multiples from
the list.Use the following prototype
void Remove (Ordered_List &list1 , int val);
Separate this function should separate the numbers from an object to a tow new lists one for ODD
numbers and one for EVEN numbers. Use the following prototype
void Separate (Ordered_List list1, Ordered_List &ODD, Ordered_List &EVEN)
Part 4:
Write a menu driven program that allow the user to perform the flowing options:
1) Load file
2) Add new number
3) Duplicate numbers
4) Remove multiples of 3
5) Separate odd and even
6) Store list
7) Exit
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY