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.

Kemahiran: Java, Javascript, MySQL, PHP, Kejuruteraan Perisian

Lihat lagi: 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

Tentang Majikan:
( 0 ulasan ) Galesburg, United States

ID Projek: #19262510

Dianugerahkan kepada:

$15 USD dalam sehari
(11 Ulasan)

3 pekerja bebas membida secara purata $88 untuk pekerjaan ini


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

$222 USD dalam 3 hari
(54 Ulasan)

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 Lagi

$27 USD dalam sehari
(36 Ulasan)