Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7521747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:19:01+00:00 2026-05-30T02:19:01+00:00

The requirements of the following java assignment are unclear to me. Does anyone understand

  • 0

The requirements of the following java assignment are unclear to me. Does anyone understand what is needed?

Assignment: In the previous assignment, you implemented a stack and a list that both inherited from the abstract class ArrayIntCollection. In this next task you are supposed to extend that implementation by making 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 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 modified methods.

The way I understand it, I need to create an exception class called CollectionException. This class needs to extend UncheckedException. (This part is not working, as I cannot find a class called UncheckedException).

Also, it is apparent whether I am to use try\catch or throw for this task?

Thanks to all!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:19:03+00:00Added an answer on May 30, 2026 at 2:19 am

    …by make it throw exceptions…

    will mean, yes, you have to use throw.

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

    At least here you will have to use try...catch.

    Regarding “UncheckedException”: Either there is a class of this name (perhaps in another package). Then you can ask your teacher where it is. Otherwise you can extend from java.lang.RuntimeException (which is an unchecked exception) and ask you teacher if that’s OK.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking to write a java program that has the following requirements: An ability
I am searching for a CMS that meets the following requirements: Based on .NET
Can someone recommend a hosted solution that answers the following requirements (I have seen
I need assistance finding a delivery method that best fulfills the following requirements: We
I've been using the following web development stack for a few years: java/spring/hibernate/mysql/jetty/wicket/jquery For
I am still getting to understand Test Driven Development. I have the following requirements
I need some sort of solution in Java for the following requirements: Search in
I have the following requirements: Keeping a list of users on disk for future
Which Scala ORMs fit and work best with the following requirements? Sufficiently typesafe. Does
I'm desperately looking for a Java HTML view engine that fulfills three main requirements:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.