Instruction: 1) Do not change the name of class. 2) Should write each line comments to explain your code. 3) Follow the guidelines we discussed in our class in submitting programming assignment when...


Instruction: 1) Do not change the name of class. 2) Should write each line comments to explain your code. 3) Follow the<br>guidelines we discussed in our class in submitting programming assignment when you submit via Bb. 4) Use the attached<br>file in Bb to work on this Lab.<br>Extend the class (linkedListType and/or unorderedLinkedList) by adding the following operation:<br>We discussed the function deleteSmallest() as find and delete the first occurred smallest element in a list. In this lab,<br>we will implement the following function (see (A)) and write a test program to perform several tasks (see (B)).<br>(A) Find the smallest element appeared in the list. Then, delete all occurrences of the item from the list. Add these<br>as abstract functions in the class linkedListType and provide the definitions of these functions in the class un-<br>orderedLinkedList.<br>(Hint: add the abstract type ( virtual Type detectSmallestElement ()<br>0:) in the class linkedList Type)<br>%3D<br>(B) Write a test program to perform the followings (see the output)<br>(A) Creates linked list object (object type is integer).<br>(B) Prompt the user's to enter inputs providing an appropriate ending statement (use-999 to end a user's input)<br>(C) print<br>(D) Requesting the user to enter the number to be deleted, print a list after deleting all occurrences of the number<br>from the list, and print a current length of the list<br>(E) Find the smallest element and delete it in the list (only the first occurred element nceds to be deleted if more than<br>one exists). Then, list after deleting the smallest element and print a current length of the list<br>(F) Find the smallest element appeared in the list. Then, delete all occurrences of the item from the list. List after<br>deleting all ocurrences of the detected smallest element and print a current length of the list<br>

Extracted text: Instruction: 1) Do not change the name of class. 2) Should write each line comments to explain your code. 3) Follow the guidelines we discussed in our class in submitting programming assignment when you submit via Bb. 4) Use the attached file in Bb to work on this Lab. Extend the class (linkedListType and/or unorderedLinkedList) by adding the following operation: We discussed the function deleteSmallest() as find and delete the first occurred smallest element in a list. In this lab, we will implement the following function (see (A)) and write a test program to perform several tasks (see (B)). (A) Find the smallest element appeared in the list. Then, delete all occurrences of the item from the list. Add these as abstract functions in the class linkedListType and provide the definitions of these functions in the class un- orderedLinkedList. (Hint: add the abstract type ( virtual Type detectSmallestElement () 0:) in the class linkedList Type) %3D (B) Write a test program to perform the followings (see the output) (A) Creates linked list object (object type is integer). (B) Prompt the user's to enter inputs providing an appropriate ending statement (use-999 to end a user's input) (C) print (D) Requesting the user to enter the number to be deleted, print a list after deleting all occurrences of the number from the list, and print a current length of the list (E) Find the smallest element and delete it in the list (only the first occurred element nceds to be deleted if more than one exists). Then, list after deleting the smallest element and print a current length of the list (F) Find the smallest element appeared in the list. Then, delete all occurrences of the item from the list. List after deleting all ocurrences of the detected smallest element and print a current length of the list
Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here