Færdiggjort

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.

Evner: Java, Javascript, MySQL, PHP, Software Arkitektur

Se mere: 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

Om arbejdsgiveren:
( 0 bedømmelser ) Galesburg, United States

Projekt ID: #19262510

Tildelt til:

$15 USD på 1 dag
(11 bedømmelser)
2.8

3 freelancere byder i gennemsnit $88 på dette job

liveexperts123

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

$222 USD in 3 dage
(54 bedømmelser)
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 Flere

$27 USD på 1 dag
(36 bedømmelser)
4.8