Questions I'm not sure of.

I need help on these 3 questions im stuck on.


8) Discuss how the following input problems can be resolved:
a. The user typing an out-of-range value
b. Getting no value (end-of-file)
c. The user typing something of the wrong type

9) In what way is input usually harder than output?

10) In what way is output usually harder than input?
I can't see a great way to answer these without simply answering the questions. Do a bit of brainstorming and post your thoughts here, and we'll see if we can't help that way.
These all seem like homework/open-ended questions. Have you thought about them yourself?
I have thought about them, but I dont understand what she means. Can somebody give me an explanation of each question in detail. You dont need to give me the answer, I just need the questions expanded a bit more.
8) should be pretty obvious, 9)/10) either are poorly worded or are some sort of joke.
Just ignore them or demand clarification from the one who asked you these.
Here they are reworded :)
8)

a. How could you deal with the user entering a value that is larger than the maximum value that can be stored in an integer? For example if the user enters
123481923581903458102378947324891273489127394
then you will get an exception or an error thrown. How can you avoid this?

b. How would you deal with not getting any input, whether you are reading from a file and it is empty or if you get no input from the user.

c. How would you deal with a situation in which you ask the user for an int and they enter a string. for example if you need a number and the user enters "Hello, world!" what could you do to prevent an error?

9) In what ways is it harder to deal with a user inputting something than it is to output text?

10) In what way is it harder to output text then to get input from a user?

as athar pointed out 9 and 10 are pretty stupid, but hopefully this clarified the others :)

questions 9 and 10 are dumb.
8)
The answer is string
a. simple if()
b. empty string
c. convert string to numeric failed

9) recognizing and parsing format
10) creating format
dont just post answers coder777, doesnt help.
Topic archived. No new replies allowed.