Solved-Assignment 6A- Solution

$35.00 $24.00

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: (a) emptying the list (b) adding…

You’ll get a: . zip file solution

 

 
Categorys:

Description

5/5 – (2 votes)

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:

(a) emptying the list

(b) adding a new element at the beginning of the list.

(c) adding a new element at the end of the list.

(d) adding a new element at a speci ed position in the list.

(e) removing an element from the beginning of the list.

(f) removing an element from the end of the list.

(g) removing an element from a speci ed position in the list.

(h) determining if the list contains a speci ed value.

(i) count the number of occurences of a speci ed value.

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

(a) an private integer for the stored data.

(b) a private Node reference for the next link.

(c) Constructors/getters/setters as necessary.

3. (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

2. ArrayList.java

3. 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.