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.

Taidot: Java, Javascript, MySQL, PHP, tietojärjestelmäarkkitehtuuri

Näytä lisää: 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

Tietoa työnantajasta:
( 0 arvostelua ) Galesburg, United States

Projektin tunnus: #19262510

Myönnetty käyttäjälle:

$15 USD 1 päivässä
(11 Arvostelua)

3 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön


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

$222 USD 3 päivässä
(54 arvostelua)

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 Lisää

$27 USD 1 päivässä
(36 arvostelua)