Search:

Type: Posts; User: Norm

Search: Search took 0.23 seconds.

  1. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    Sorry, I don't feel like going through your assignment. Your teacher must expect you to be able to understand it. If not, go ask him about the parts you don't understand.
  2. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    Who suggested you use a class with no documentation?
  3. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    If you don't have any documentation on how to use the LEDFont class it will be VERY DIFFICULT to use it.
    You must have documentation.
  4. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    That doesn't make any difference. You still need to know how to use its methods.
    Is getLetter() a method in the LEDFont class?
  5. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    What is LEDFont? A class or a reference/pointer to an instance of a class?
    For example:
    AClass aClsRef = new AClass(); // create instance of a class and save its address
    AClass is a class....
  6. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    The way you invoke a method of a class is to get a reference to that class and append to it the method separated by a . (dot):
    aClassRef.theMethod(theargs);
  7. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    Sort of.
    Is this a merge of the contents of one array into another or is the complete replacement of one array be another?
    For example if letter is [2][4] and matrix is [30][50] then it would be...
  8. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    Please describe what you want the code to do. Your example methods are full of errors.
    For example a method named get... should return something.
    The letter array in getLetter() will go away when...
  9. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    Ok. Let's see what happens tomorrow.
  10. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    Look at this code example:


    public class TestCode4 {
    int theVar = 4; // the class variable that will be shadowed in method1

    public void method1() {
    int theVar = 55; // define a...
  11. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    Show me the line of code you are talking about.
  12. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    Its a simple case of removing the <data type> from the assignment statement in the main() method to make it only an assignment and not a definition and assignment.
  13. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    public LEDDisplay()
    {
    super();
    boolean[][] matrix = new boolean ...
    Here you have defined a new variable in addition and shadowing the global one. You have two variables named matrix. The...
  14. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    I suspect the error is occuring on this line:

    if (matrix[j][i])
    because the variable matrix has not been set to any value because of the problem I showed in post #4

    Your IDE doesn't seem to...
  15. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    Then your IDE does not work with a valid java program.
    It is very,very unusual for an error to occur on line 2 of a java program.
    Usually the first line is the class statement (and that excludes...
  16. Replies
    40
    Views
    5,671

    Re: Implementing a two-dimensional boolean array

    One problem you have is that you have two variables named matrix at different scopes.
    The variable at the inner scope hides the outer one,so the outer one does not get set to a value.

    When you...
Results 1 to 16 of 16