Assignment 6A Solution

$30.00

Description

Assignment 6A Skills

Lists

Assignment 6A Background

For this assignment you will be writing classes for lists that store integers.

Assignment 6A Requirements

  1. (20%) Write a class called ArrayList that uses an integer array to store a list of integers. It should implement methods for the following operations:

    1. emptying the list

    1. adding a new element at the beginning of the list.

    1. adding a new element at the end of the list.

    1. adding a new element at a speci ed position in the list.

    1. removing an element from the beginning of the list.

    1. removing an element from the end of the list.

    1. removing an element from a speci ed position in the list.

    1. determining if the list contains a speci ed value.

    1. count the number of occurences of a speci ed value.

  1. (10%) Write a class called Node. This class should include the following:

    1. an private integer for the stored data.

    1. a private Node reference for the next link.

    1. Constructors/getters/setters as necessary.

  1. (20%) Write a class called LinkedList that uses linked data to store a list of integers. It should implement methods for the same operations as the ArrayList class.

Assignment 6A Submission Submit on Blackboard:

  1. Node.java

  1. ArrayList.java

  1. LinkedList.java

Required Each submitted le should include your name and a statement that this is your own work. This should appear as a comment at the beginning of any code le.