SIT 232 Object-Oriented Development Null Reference Exception Null Reference Exception
1. What is a possible situation that leads to the exception?
A NullReferenceException
2. Who is the charge of throwing the excepti
...
SIT 232 Object-Oriented Development Null Reference Exception Null Reference Exception
1. What is a possible situation that leads to the exception?
A NullReferenceException
2. Who is the charge of throwing the exception: you as a programmer or the runtime
system? In theory, should you throw exception of this type? Explain your answer.
3. If you need to throw the exception, what details would you provide as a message
to the user(caller)? What parameters would you include in the message?
4. Can the exception be generally caught (and therefore handled)?
5. If the exceptions occurs, should you generally catch this exception type or is it
better to pass such exception to the user (caller)? It is not enough to say yes or no:
you must provide an argument to support your answer.
6. Is the exception a case when you want to avoid this exception to occur in your
application in general? If so, what would be your actions as a programmer to avoid
it?
Index out of Range
1. What is a possible situation that leads to the exception?
2. Who is the charge of throwing the exception: you as a programmer or the runtime
system? In theory, should you throw exception of this type? Explain your answer.
3. If you need to throw the exception, what details would you provide as a message
to the user(caller)? What parameters would you include in the message?
Can the exception be generally caught (and therefore handled)?
5.Is the exception a case when you want to avoid this exception to occur in your
application in general? If so, what would be your actions as a programmer to avoid it?
Stack overflow
1. What is a possible situation that leads to the exception?
2. Who is the charge of throwing the exception: you as a programmer or the runtime
system? In theory, should you throw exception of this type? Explain your answer.
3. If you need to throw the exception, what details would you provide as a message
to the user(caller)? What parameters would you include in the message?
4. Can the exception be generally caught (and therefore handled)?
5. If the exceptions occurs, should you generally catch this exception type or is it
better to pass such exception to the user (caller)? It is not enough to say yes or no:
you must provide an argument to support your answer.
6. Is the exception a case when you want to avoid this exception to occur in your
application in general? If so, what would be your actions as a programmer to avoid
it?
Out of memory of exception
1. What is a possible situation that leads to the exception?
2. Who is the charge of throwing the exception: you as a programmer or the runtime
system? In theory, should you throw exception of this type? Explain your answer.
3. If you need to throw the exception, what details would you provide as a message
to the user(caller)? What parameters would you include in the message?
4. Can the exception be generally caught (and therefore handled)?
5. If the exceptions occurs, should you generally catch this exception type or is it
better to pass such exception to the user (caller)? It is not enough to say yes or no:
you must provide an argument to support your answer.
6. Is the exception a case when you want to avoid this exception to occur in your
application in general? If so, what would be your actions as a programmer to avoid
it?
Invalid cast exception
1. What is a possible situation that leads to the exception?
2. Who is the charge of throwing the exception: you as a programmer or the runtime
system? In theory, should you throw exception of this type? Explain your answer.
3. If you need to throw the exception, what details would you provide as a message
to the user(caller)? What parameters would you include in the message?
4. Can the exception be generally caught (and therefore handled)?
5. If the exceptions occurs, should you generally catch this exception type or is it
better to pass such exception to the user (caller)? It is not enough to say yes or no:
you must provide an argument to support your answer.
6. Is the exception a case when you want to avoid this exception to occur in your
application in general? If so, what would be your actions as a programmer to avoid
it?
.
Divide by zero exception
1. What is a possible situation that leads to the exception?
.
2. Who is the charge of throwing the exception: you as a programmer or the runtime
system? In theory, should you throw exception of this type? Explain your answer.
3. If you need to throw the exception, what details would you provide as a message
to the user(caller)? What parameters would you include in the message?
4. Can the exception be generally caught (and therefore handled)?
5. If the exceptions occurs, should you generally catch this exception type or is it
better to pass such exception to the user (caller)? It is not enough to say yes or no:
you must provide an argument to support your answer.
6. Is the exception a case when you want to avoid this exception to occur in your
application in general? If so, what would be your actions as a programmer to avoid
it?
Argument Exception
1. What is a possible situation that leads to the exception?
2. Who is the charge of throwing the exception: you as a programmer or the runtime
system? In theory, should you throw exception of this type? Explain your answer.
3. If you need to throw the exception, what details would you provide as a message
to the user(caller)? What parameters would you include in the message?
4. Can the exception be generally caught (and therefore handled)?
5. If the exceptions occurs, should you generally catch this exception type or is it
better to pass such exception to the user (caller)? It is not enough to say yes or no:
you must provide an argument to support your answer.
6. Is the exception a case when you want to avoid this exception to occur in your
application in general? If so, what would be your actions as a programmer to avoid
it?
Argument Out Of Range Exception
1. What is a possible situation that leads to the exception?
2. Who is the charge of throwing the exception: you as a programmer or the runtime
system? In theory, should you throw exception of this type? Explain your answer.
3. If you need to throw the exception, what details would you provide as a message
to the user(caller)? What parameters would you include in the message?
4. Can the exception be generally caught (and therefore handled)?
5. If the exceptions occurs, should you generally catch this exception type or is it
better to pass such exception to the user (caller)? It is not enough to say yes or no:
you must provide an argument to support your answer.
6. Is the exception a case when you want to avoid this exception to occur in your
application in general? If so, what would be your actions as a programmer to avoid
it?
System Exception
1. What is a possible situation that leads to the exception?
2. Who is the charge of throwing the exception: you as a programmer or the runtime
system? In theory, should you throw exception of this type? Explain your answer.
3. If you need to throw the exception, what details would you provide as a message
to the user(caller)? What parameters would you include in the message?
4. Can the exception be generally caught (and therefore handled)?
5. If the exceptions occurs, should you generally catch this exception type or is it
better to pass such exception to the user (caller)? It is not enough to say yes or no:
you must provide an argument to support your answer.
6. Is the exception a case when you want to avoid this exception to occur in your
application in general? If so, what would be your actions as a programmer to avoid
it?
[Show More]