Preview

ECET 370 Week 3 Lab 3 Linked Lists

Good Essays
Open Document
Open Document
714 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
ECET 370 Week 3 Lab 3 Linked Lists
This pack of ECET 370 Week 3 Lab 3 Linked Lists includes:

Exercise 1

Exercise 2

Exercise 3

Exercise 4

Exercise 5

Output

General Instructions

Exercises 1, 2, and 3 use the programs in DocSharing labeled “User-defined array list."

Exercise 4 uses the programs in DocSharing labeled “Using java.util.ArrayList."

Exercise 1: Review of array-based lists Create a project using the classes in the DocSharing area labeled “User-defined array list." Compile it, run it, and review the code that is given carefully. This code tests the ArrayList class provided in the lecture.

Exercise 2: A user-defined array list Modify the class ArrayList given in the lecture by adding to

it the functions listed below for Exercise 2. In each case, the appropriate error message should be generated if an invalid condition occurs. For example, an error message should be generated when trying to insert an item in a given location in the list and the location is out of range, a. ArrayList(inl size): create a constructor that sets the size of the array list to the value passed in size (note that the class variable SIZE cannot be final anymore), b. int length(): create this function to determine the number of items in the list (accessor function), c. int gelSize(): create this function to determine the size of the list (accessor function), d. void clear(): create this function to remove all of the items from the list. After this operation, the length of the list is zero, e. void replace(int location, int item): create this function to replace the item in the list at the position specified by location. The item should be replaced with item. f. void insert(int location, int item): create this function to add an item to the list at the position specified by location, g. void remove(int item): create this function to delete an item from the list. All ...

Search for more tutorials here - https://bitly.com/12AVRID

You surely realize that there

You May Also Find These Documents Helpful

  • Satisfactory Essays

    b. b. Include the function written in Exercise 8a in a working program. Make sure your…

    • 720 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Nt1420 Unit 6

    • 1145 Words
    • 5 Pages

    INSTRUCTIONS: 1. THERE ARE SIX (6) QUESTIONS IN THIS PAPER. 2. ANSWER FIVE (5) QUESTIONS ONLY. Question 1 Arrays are used when storing a large number of values. You are required to create an array named a and answer the following questions regarding array manipulation. a. Write a method fillRandom(int[] a, int min, int max), fill the array a with a random integer value. (Note: Math.random() returns a double in the range of 0.0 and 1.0, therefore it is cast to an integer number, between the minimum and maximum value). [6 marks] b. Write the Bubble sort method to sort array a into descending order. [10 marks] c. In the quicksort, an algorithm an element is chosen from the unsorted list. This element is called the…

    • 1145 Words
    • 5 Pages
    Good Essays
  • Good Essays

    ECET 370 Week 5 Lab 5

    • 650 Words
    • 3 Pages

    Exercise 1: Review of the Lecture Content Create a project using the ArrayList class and the Main class provided in DocSharing. The ArrayList class contains implementations of the first three search methods explained in this week's lecture: sequential, sorted, and binary search. The Main class uses these three methods. These programs test the code discussed in the lecture. Compile the project, run it, and review the code that is given carefully.…

    • 650 Words
    • 3 Pages
    Good Essays
  • Good Essays

    This is our first individual assignment for Programming unit this semester. This assignment was given in December 2013, and submission date is on 10th February 2014.…

    • 1859 Words
    • 8 Pages
    Good Essays
  • Good Essays

    Array Structure Paper

    • 833 Words
    • 4 Pages

    Once again Berry’s Bug Blasters are requesting an update to the previous program that was designed to help them to better serve their customers. The company has requested a way to display the name and phone number of their clients so that they can keep a record of what clients have called. The best way in the opinion to accomplish this is to build an array into the program. This will allow those in charge of the company record to record who has called and then to display the names of the clients and their number in a chart so that it can be recalled at a later date as needed.…

    • 833 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    CS 220 – Programming w/ Data Structures: You have missed one assignment and one quiz. Your instructor has extended your assignment due date to this Sunday, April 10. Your instructor has also let you to take your Quiz # 2 during his office hours during this week. Let me know if you need additional support to study for this quiz. Your grade to date in this class is 30.2/37 81.62% B.…

    • 354 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Lct1 Task 1

    • 797 Words
    • 4 Pages

    “For this reason a man shall leave his Father and his Mother, and be joined to his wife; and they shall become one flesh.” - Genesis 2:24, NIV…

    • 797 Words
    • 4 Pages
    Satisfactory Essays
  • Powerful Essays

    Err in Health

    • 3151 Words
    • 13 Pages

    A) It is your responsibility to read the assignment carefully and make sure you understand what you need to do and what you should hand in. If you are not sure, check with your tutor.…

    • 3151 Words
    • 13 Pages
    Powerful Essays
  • Good Essays

    Mineral Identification

    • 546 Words
    • 3 Pages

    4. Post Part 1, Part 2, and Part 3 in this worksheet as an attachment to your Assignment Section. Delete the introductory instructions in this worksheet before you submit it to your instructor.…

    • 546 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Car Rental Project

    • 1180 Words
    • 5 Pages

    This assignment will be marked out of 100 and carries 70% of the overall module weighting. (The first part of the coursework carried the remaining 30%.) Your .java files and report for this part must be uploaded and submitted by 5pm on Friday of Week 12. The assignment must be carried out individually so you must not obtain help from anyone other than the module teaching staff. You must not copy code from any source apart from the module core text and the module materials. Collusion, plagiarism (unreferenced copying) and other forms of cheating constitute Academic Misconduct, which can lead to failure of the module and suspension.…

    • 1180 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    The approach towards the development of this program is vital. There are many techniques that need to be taken into consideration to help the development of the program, the assignment states that there are two classes, First class (seats 1-5) and Economy Class (seats 6-10). It also states that a technique called “one dimensional array” must be used. An array is blocks of elements, these blocks of elements are placed into memory locations that are close to each other.…

    • 959 Words
    • 4 Pages
    Powerful Essays
  • Good Essays

    B: Look at the following information. Then, write a bullet list in the space given.…

    • 3369 Words
    • 14 Pages
    Good Essays
  • Powerful Essays

    a) Write a program to find duplicate elements in a given array and print them.…

    • 1253 Words
    • 6 Pages
    Powerful Essays
  • Satisfactory Essays

    Interface Classes

    • 594 Words
    • 3 Pages

    • primitive types: int, double, boolean, long, float, char, .. note: java will "coerce" some types into other types: double number = 4; • Object types: Every class • Arrays : int[ ], double[ ][ ], Balloon[ ], defines a type • Predefined: String, Color, File, Scanner, … • Programmer defined: CartoonFigure, Balloon, BalloonGame, … • Type of object determined at its creation: • new Balloon(100, 300) ⇒ a Balloon object • new File ("data.txt") ⇒ a File object • new int[100][100] ⇒ an array of arrays of int. • "Hello" ⇒ a String…

    • 594 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    The purpose of this tutorial letter is to provide feedback on assignments 01, question 2,…

    • 1525 Words
    • 7 Pages
    Powerful Essays

Related Topics