in the previous assignment you implemented a


In the previous assignment, you implemented a stack and a list that both inherited from the abstract class ArrayIntCollection. In this task you are supposed to extend that implementation by make it throw exceptions if you try to perform operations that are not allowed (for example, if you try to call pop or peek on an empty stack or if you try to remove an element from a non existing position).

You shall create and use the exception class CollectionException, of the type UncheckedException.

Also write a test program ExceptionMain.java that generates and catches exceptions from your modi ed methods

Write a program SumMain, that includes a recursive method computing the sum of the integers 1, 2, 3, ..., N. The computation should be based on the following principle: the sum of the integers from 1 to N is equal to the sum of the integers from 1 to N/2 added with the sum of the integers from N/2+1 to N. Is this a good solution strategy? Motivate your answer!

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: in the previous assignment you implemented a
Reference No:- TGS0211048

Expected delivery within 24 Hours