Need help for array linear list program in java

Assignment Help JAVA Programming
Reference no: EM131591427

Need help for array linear list program in java.

package data_structures;

import java.util.Iterator;
import java.util.NoSuchElementException;

public interface LinearListADT<E> extends Iterable<E> {
public static final int DEFAULT_MAX_CAPACITY = 100;

// Adds the Object obj to the end of list.
public void addLast(E obj);

// Adds the Object obj to the beginning of list.
public void addFirst(E obj);

// Inserts the Object obj at the position indicated. If there is an element at
// that location, all elements from that location to the end of the list are
// shifted down to make room for the new insertion. The location is one based.
// If the location > size()+1 then a RuntimeException is thrown. List elements // must be contiguous.
public void insert(E obj, int location);

// Removes and returns the object located at the parameter location (one based).
// Throws a RuntimeException if the location does not map to a valid position within the list.
public E remove(int location);

// Removes and returns the parameter object obj from the list if the list contains it, null otherwise.
// The ordering of the list is preserved. The list may contain duplicate elements. This method
// removes and returns the first matching element found when traversing the list from first position.
public E remove(E obj);

// Removes and returns the parameter object obj in first position in list if the list is not empty,
// null if the list is empty. The ordering of the list is preserved.
public E removeFirst();

// Removes and returns the parameter object obj in last position in list if the list is not empty,
// null if the list is empty. The ordering of the list is preserved.
public E removeLast();

// Returns the parameter object located at the parameter location position (one based).
// Throws a RuntimeException if the location does not map to a valid position within the list.
public E get(int location);

// Returns true if the parameter object obj is in the list, false otherwise.
public boolean contains(E obj);

// Returns the one based location of the parameter object obj if it is in the list, -1 otherwise.
// In the case of duplicates, this method returns the element closest to position #1.
public int locate(E obj);

// The list is returned to an empty state.
public void clear();

// Returns true if the list is empty, otherwise false
public boolean isEmpty();

// Returns the number of Objects currently in the list.
public int size();

// Returns an Iterator of the values in the list, presented in
// the same order as the underlying order of the list. (position #1 first)
public Iterator<E> iterator();

}

Reference no: EM131591427

Questions Cloud

Use at least two capital budgeting methods : Which should the company do and why? You must use at least two capital budgeting methods.
Analysis of the cyclical nature of nurse scheduling : Analysis of the Cyclical Nature of Nurse Scheduling, final project report for my internship at the american red cross
Evaluating investment from a large financial services firm : You are evaluating an investment from a large financial services firm.
General overview of the disease : Identify and choose a disease that affects an aging person's memory or cognitive ability. 4 to 5 Microsoft Word document that includes the following:
Need help for array linear list program in java : Need help for array linear list program in java - Removes and returns the object located at the parameter location (one based)
What part did the national labor relations act : What part did the National Labor Relations Act (Wagner Acct) play in union organizing? What were some major union highlights - needed to show.
What you have read and researched : Based on what you have read and researched, do you believe that the loss of biodiversity is a concern for humans?
Eight dimensions of organizational capacity for change : Identify and describe the Eight Dimensions of Organizational Capacity for Change (OCC). For each Dimension, discuss its significance to the organization.
Define the economic viability of the hospitality : There is growing recognition that traditional management practices have led to undesirable social and environmental impacts.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd