COSC-2336 Programming Fundamentals III (Data Structures) Programming Assignment 7 The implementations of the methods contains(E e),...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
COSC-2336 Programming Fundamentals III (Data Structures) Programming Assignment 7 The implementations of the methods contains(E e), get(int index), indexOf(E e), lastIndexOf(E e), and set(int index, E e) are omitted in the Listing 24.5 MyLinkedList class. Implement the above methods. Define a new class named MyLinkedListExtra that extends MyLinkedList to override these methods. Test your implementation with the program, MyLinkedListAugmented .java. Your output should match the sample below: Original list: [Mike, Jim, Alice, George, Stevie, Cheryl, George, Jane, Ella, Jenny, Kathy, Jane] Enter a name: Sue Enter an index at which to store this name: 3 Revised list: [Mike, Jim, Alice, Sue, George, Stevie, Cheryl, George, Jane, Ella, Jenny, Kathy, Jane] List contains Sue: true Item at index 3: Sue Index of George: 4 Last index of George: 7 Store the source code in a file named MyLinkedListAugmented-your_name>java. In comments at the top of the source code file place the following: COSC 2336 Instructor: Programming Assignment 7 Due: Additional documentation should follow the guidelines in the CS Department's Programming Documentation Requirements, which can be accessed under Content. Upload your source code and screenshot of output to Blackboard. COSC-2336 Programming Fundamentals III (Data Structures) Programming Assignment 7 The implementations of the methods contains(E e), get(int index), indexOf(E e), lastIndexOf(E e), and set(int index, E e) are omitted in the Listing 24.5 MyLinkedList class. Implement the above methods. Define a new class named MyLinkedListExtra that extends MyLinkedList to override these methods. Test your implementation with the program, MyLinkedListAugmented .java. Your output should match the sample below: Original list: [Mike, Jim, Alice, George, Stevie, Cheryl, George, Jane, Ella, Jenny, Kathy, Jane] Enter a name: Sue Enter an index at which to store this name: 3 Revised list: [Mike, Jim, Alice, Sue, George, Stevie, Cheryl, George, Jane, Ella, Jenny, Kathy, Jane] List contains Sue: true Item at index 3: Sue Index of George: 4 Last index of George: 7 Store the source code in a file named MyLinkedListAugmented-your_name>java. In comments at the top of the source code file place the following: COSC 2336 Instructor: Programming Assignment 7 Due: Additional documentation should follow the guidelines in the CS Department's Programming Documentation Requirements, which can be accessed under Content. Upload your source code and screenshot of output to Blackboard.
Expert Answer:
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Assume that self-esteem measurements are not affected by an interaction between subject self-esteem and target self-esteem. Is there sufficient evidence to support the claim that the category of the...
-
Let (Z Z, ) be the abelian group where (a, b) (c, d) = (a + c, b + d) - here a + c and b + d are computed using ordinary addition in Z - and let (G, +) be an additive group. If f (1, 3) = g1 group...
-
On March 31, 2017, Sammonds Inc. issued $250,000 face value bonds at a discount of $7,000. The bonds were retired at their maturity date, March 31, 2027. Required Assuming that the last interest...
-
Discuss the main recognition and measurement issues that must be considered when preparing the income statement.
-
Sara's Systems manufactures audio systems for cars. Two models are produced: The Standard model has a budgeted price of $200 and a standard variable cost of $80. The Blaster model has a budgeted...
-
Instructions Question 1 A has 1 and 2 Question 1 B has 1 and 2. Question 2 A has one question Question 2 B has 1, 2, 3 Question 1 Compound Interest and Savings Annuities Use the information in the...
-
2. (10 points) Suppose you have a probability distribution P, supported on the positive integers 0,...,n, and a second probability distribution Q supported on 0,...,m. Consider P as being represented...
-
Read the Essay regarding the Tesco UK retailer Groceries? ?and develop a structure of argument ? based on the information collected and analyzed.? Develop a position statement and use three...
-
Explain whether Positive, negative, or no work is being done on a suitcase when you: (a) pick it up from the floor. (b) carry it at a steady speed on a level street to the bus stop. (c) hold it above...
-
moldo14 1. The life of a certain type of engine is normally distributed with a mean of 10 years, and a standard deviation of 1.5 years. (1) If one (n=1) engine is randomly selected, what is the...
-
According to this assignment, what is the amount of debits and credits to the cash account?
-
A 45-kg crate is pulled 35 m along a horizontal floor by a constant force exerted by a person, F=115N, which acts at a 32 angle. The coefficient of friction is 0.15. Determine the work done on the...
-
Using the above scenario and acting as a Management Accounting Officer, you are required to present a report in a word format for P1, P2 to the General Manager choosing one organisation you are...
-
H Corporation has a bond outstanding. It has a coupon rate of 8 percent and a $1000 par value. The bond has 6 years left to maturity but could be called after three years for $1000 plus a call...
-
The String class is provided in the Java library. Provide your own implementation for the following methods (name the new class MyString2): public MyString2(String s); public int compare(String s);...
-
Listing 28.14, NineTail.java, presents a solution for the nine tails problem. Revise this program for the 4 * 4 16 tails problem. Note that it is possible that a solution may not exist for a starting...
-
Write a program that plays the popular scissor-rockpaper game. (A scissor can cut a paper, a rock can knock a scissor, and a paper can wrap a rock.) The program randomly generates a number 0, 1, or 2...
-
Every data set contains at least one mode. In Exercises 1316, determine whether the statement is true or false. If the statement is false, rewrite it as a true statement.
-
A mode is always a value that is in the data set. In Exercises 1316, determine whether the statement is true or false. If the statement is false, rewrite it as a true statement.
-
Find the mean, median, and mode for the following data set: 28-31 28 0 31 -23
Study smarter with the SolutionInn App