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.
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.
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 :)