Question

Suppose you were asked to test some code for possible issues handling exceptions. Describe briefly how...

Suppose you were asked to test some code for possible issues handling exceptions. Describe briefly how you would go about testing to see if your code was exception-safe.

Homework Answers

Answer #1

Most of the test cases are written considering the upper and lower limits of the loops or the conditions of if else statements.

In whitebox testing, user can see the code and write test cases accordingly by checking the boundary conditions.

The testing should also consider the conditions that are handled in case null values come up in the processing of strings, int etc.

Input Output files exception handling is done when there is interaction of code and files on system.

If there is any division of a variable, then Arithmetic Exceptions need to be checked.

In case, if Array is used then Array Index should be checked if the code process array data.

There are many other pre defined Exceptions that can be handled in java. Also java gives us the option to explicitly throw Exception if we want to create a self defined Exception and handle it own way.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Suppose you were asked to build a pair of electronic dice (a counter that counts 1–6,...
Suppose you were asked to build a pair of electronic dice (a counter that counts 1–6, repeats, and stops randomly). Briefly describe how you would use the idea of a counter to build this device.
If you were asked to set up an Ames test for your chemical company, would you...
If you were asked to set up an Ames test for your chemical company, would you use Salmonella Strain A or Strain B? Briefly explain your reasoning
While it’s not possible to anticipate all ethical issues you might encounter with stakeholders, it is...
While it’s not possible to anticipate all ethical issues you might encounter with stakeholders, it is good practice to have some solid guidelines in place in your company’s code of ethics. What is one guideline you would include in your company’s code of ethics that pertains to stakeholders? Why?
In the clinic you have encountered a possible new infectious disease. Describe in detail how are...
In the clinic you have encountered a possible new infectious disease. Describe in detail how are you would go about in treatment and identification of the disease cause:
Suppose a client came in and asked you for some feedback about current market trends or...
Suppose a client came in and asked you for some feedback about current market trends or trends pertaining to current events. What are at least three current market trends and how would you take advantage of them for your client?
In a few sentences, describe a possible study that would require you to use a chi-square...
In a few sentences, describe a possible study that would require you to use a chi-square analysis. Be sure to describe what your variable(s) are, how they were measured (being sure to mention the scale of measurement), and what hypothesis you would be testing.
Suppose you work for a national statistical agency and are asked to set up a program...
Suppose you work for a national statistical agency and are asked to set up a program to collect data on and compute a consumer price index. How would you go about doing this?
) Briefly describe the three types of bilingualism 2) How you would include in your environment...
) Briefly describe the three types of bilingualism 2) How you would include in your environment and materials 3) What you would do if a child's language was not spoken in the classroom 4) Describe embedded assessment and what it would look like in your classroom or program. 5) Anything that really resonates with you, stands out to you or surprises you about working with Dual Language Learners.
1. Suppose you are at the validation stage distributional modeling. Describe briefly how you may: a)...
1. Suppose you are at the validation stage distributional modeling. Describe briefly how you may: a) Informally assess your data/sample so as to make a guess as to what your model should be (give an example). b) Informally assess your data/sample so as to make a confirmation on the model of your choice (provide an example). Note: Your conjectured model may be discrete or continuous.
Indicate the statistical test you would conduct. Respondents in a survey of 1,000 households were asked...
Indicate the statistical test you would conduct. Respondents in a survey of 1,000 households were asked about their travel history. Specifically, they were asked how often they have been to Europe in the past five years (using a ratio scale). People were also classified by interest type (art-lovers, food-lovers, or sports-lovers). The question is whether interest type influences travel history. Two-sample t-test Paired sample t-test One-way ANOVA none of those
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT