Discussion Board
Go to the previous messageThere are no next messages
Current Forum: Homework 6 General Forum
Date: Sat Dec 1 2001 7:50 pm
Author: Chen, Richard <richardc@andrew.cmu.edu>
Subject: Re: Making Moves

In a partial answers to the last posting, I'll just chime in that you can just input a "x"-coordinate for the input and TextDemo does not declare such input as an error because the "y"-coordinate (of primitive type int) of the inputted for class TextDemo should be initialized to 0 (as is good programming practice) and therefore defaults to 0 when the user inputs only a "x"-coordinate for the input.

2 things though:
1. My comment is not to say that we should not catch others types of errors (e.g. entering "4" or "4,0 as a coordinate, which leads to my 2nd point, that
2. the question, "What defines an 'error?'" is the same as that which the post immediately above this one asks which is why I could only partially answer the post immediately above this one.

Therefore, I await the TA's or professor's (more) complete answer.
Post response

Go to the previous messageThere are no next messages
Current Thread Detail:
Making Moves      Weng, Mei Xiang      Fri Nov 30 2001 9:58 pm       
Re: Making Moves      Chen, Richard      Sat Dec 1 2001 7:50 pm       

Back to previous screen