Implement a deque

Assignment Help JAVA Programming
Reference no: EM131591024

I'm trying to make a linkedList class that implements a deque. I'm really lost on how to do it. this is what i have.

import java.util.*;
public class LinkedListDeque<E> implements Deque<E> {

public LinkedListDeque() {
LinkedList<E> list = new LinkedList<E>();
}

public int size() { return list.size(); }

public boolean isEmpty() { return list.size() == 0; }

public void insertFirst(E e) { list.addFirst(e); }

public void insertLast(E e) { list.addLast(e); }

public E removeFirst() { return list.removeFirst(); }

public E removeLast() { return list.removeLast(); }

public E firstElement() { return list.getFirst(); }

public E lastElement() { return list.getLast(); }

}


Can someone hep me format this properly? I can't figure it out / not sure if it is even remotely correct. I'm trying to

Reference no: EM131591024

Questions Cloud

Why would an organization create such a policy or practice : Why would an organization create such a policy or practice? Why might this policy or practice be harmful to employees?
How much and what kind of a difference has the program : Assessing attainment of objectives: How well has the program or initiative met its stated objectives
Write a script introduce toast present an award : Write a script introduce, toast, present an award, nominate, accept, give a keynote address, celebrate commencement, commemorate or give tribute.
An inventory search of seized automobiles would be typically : Devices that enhance the senses but are not generally considered a search include
Implement a deque : Can someone hep me format this properly? I can't figure it out / not sure if it is even remotely correct. I'm trying to
Compare and contrast an it audit project : Elaborate on three (3) of the obstacles that must be overcome as a business moves up the CMMI model. Suggest key methods for overcoming the obstacles.
How will your goals benefit the organization : Briefly describe your current or a past professional position and provide essential information about the organization-what is the industry.
What are the ramifications : Explain the reasons for your choice. What is happening or not happening? What are the ramifications?
Analyzing the given national geographic channel expose : In this exercise you are to write a short paper (1-2 pages) analyzing the following National Geographic Channel expose on the Watergate scandal of the early.

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