Completed

Java program help

1. (30 points) Write JUnit test cases for the following list methods:

(a) A method cutTo that takes an integer and makes the list no longer than this value. If the list is initially longer than the desired length, the method removes values from the end to reduce the length. If the list is initially the desired length or shorter, the method has no effect. (b) A method addIfNew that takes a value and an index. The method adds that value so that it has that index unless the value is already in that position, in which case the method does nothing. Thus, calling it with arguments “hi” and 1 on the list (“hello”, “hi”, “bye”) does nothing, but calling it with “greetings” and 1 on the same list changes the list to (“hello”, “greetings”, “hi”, “bye”). The index can cause the value to become the new last value in the list. If the index is invalid, the method should throw an IndexOutOfBoundsException. (c) A method moveToHead that takes an index. It should move the value at that index to the head of the list. For example, calling it with argument 2 on the list (“a”, “b”, “c”, “d”) changes the list to (“c”, “a”, “b”, “d”). If the index is invalid, the method should throw an IndexOutOfBoundsException.

2. (30 points) Implement each of the methods above for an array-based list.

3. (30 points) Implement each of the methods from problem 1 for a linked-memory list implementation.

Skills: Java, Javascript, MySQL, PHP, Software Architecture

See more: java project help wanted, online java tutor, java help websites, programming help online free, java help reddit, java programming, free java help, ask java questions online free, java program simulate queue, different parts simple java program, parts simple java program, java mobile game implementation row, amateurmatch post join program help, java homework help, application runs java program, easy java program creator, java program can read emails, ocr java program example, java program parse log files create report, outsouce java program

About the Employer:
( 0 reviews ) Galesburg, United States

Project ID: #19262510

Awarded to:

$15 USD in 1 day
(11 Reviews)
2.8

3 freelancers are bidding on average $88 for this job

liveexperts123

hi i am java expert .............................................................................................................

$222 USD in 3 days
(54 Reviews)
6.9
anhnh23

Hi there, I believe I will help you get 100% points from this requirements in 1 day, below is my introduction: I have a bachelor’s degree in Information System and Software Engineering, with 8+ years in Java both More

$27 USD in 1 day
(36 Reviews)
4.8