Absolute Java (6th Edition)
Absolute Java (6th Edition)
6th Edition
ISBN: 9780134041674
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
Question
Book Icon
Chapter 14, Problem 3STE
Program Plan Intro

To add a string at a specified index in a list

Blurred answer
Students have asked these similar questions
Implement a function void printAll(void) to print all the items of the list.
The function swap_list_ends in python takes one parameter, L, which is a list. The function then swaps the first and last items in L and returns the object None.  Notice that since L is mutable, the changes the function makes to L are visible back in the calling program. SPECIAL CASE: If the list 'L' is empty, then the function does nothing to L and returns None. For example: Test Result L = [1, 3, 9, 2] if not(swap_list_ends(L) is None): print("Error: function should return None") print(L) [2, 3, 9, 1] L = ['super', 'awesome', 'excellent'] if not(swap_list_ends(L) is None): print("Error: function should return None") print(L) ['excellent', 'awesome', 'super'] L = [True, False] if not(swap_list_ends(L) is None): print("Error: function should return None") print(L) [False, True]
Instructions Write a program to test various operations of the class doublyLinkedList. Your program should accept a list of integers from a user and use the doubleLinkedList class to output the following: The list in ascending order. The list in descending order. The list after deleting a number. A message indicating if a number is contained in the list. Output of the list after using the copy constructor. Output of the list after using the assignment operator. An example of the program is shown below: Enter a list of positive integers ending with -999: 83 121 98 23 57 33 -999 List in ascending order: 23 33 57 83 98 121 List in descending order: 121 98 83 57 33 23 Enter item to be deleted: 57 List after deleting 57 : 23 33 83 98 121 Enter item to be searched: 23 23 found in the list. ********Testing copy constructor*********** intList: 23 33 83 98 121 ********Testing assignment operator*********** temp: 23 33 83 98 121 Your program should use the value -999 to denote the end of the…
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education