Question: I recently had a homework question where we were supposed to work with a chess board, and place a number of queens on the board. 

The question was trivial in terms of difficulty, but what I wanted to ask was this:

Should I just make a boolean 2-D array and change every position that contains a queen to 1 or should I make a private class to represent a queen, that has x and y coordinates as instance variables? 

This might not seem very important or pressing, but I'm using Java and it kinda gets to the core of the concept of OO programming. If we never use the modular capabilities of Java, then why use Java at all? We might as well have written the same thing in C or Python. 

Which would be more appropriate in general do you think? I would appreciate it if you could restrict your answers to ones that are backed by reason, as opposed to opinions or personal preferences.

Answer: 
> 
> Should I just make a boolean 2-D array and change every position that contains a queen to 1 or should I make a private class to represent a queen, that has x and y coordinates as instance variables? 
> 
> 
> 

There is no single general answer to such questions. Either one can be suitable in specific situations, solving specific problems. 

> 
> If we never use the modular capabilities of Java, then why use Java at all? We might as well have written the same thing in C or Python.
> 
> 
> 

The fact that Java is an OO language does not mean we *must* define and use classes and objects for every piece of data we need to represent.

If I understand your question correctly, you are asking about an implementation detail. Object oriented programming is not so much concerned about the specific implementation details as it is concerned about *encapsulating* those implementation details behind a suitable interface which represents some important domain concept well. Hence clients of the class need not know nor think about its implementation details, only about the higher level abstraction represented by an interface.
> 
> Should I just make a boolean 2-D array
>  and change every position that
>  contains a queen to 1 or should I make
>  a private class to represent a queen,
>  that has x and y coordinates as
>  instance variables?
> 
> 
> 

It depends on your needs. If, for example, you need to iterate over board and check each square in order to define if there is a queen I would pick the first approach, but if you have only two or three queens and make decisions depending on their mutual disposition storing coordinates as a field of a class Queen would be a better idea as for me. 

> 
> This might not seem very important or
>  pressing, but I'm using Java and it
>  kinda gets to the core of the concept
>  of OO programming. If we never use the
>  modular capabilities of Java, then why
>  use Java at all? We might as well have
>  written the same thing in C or Python.
> 
> 
> 

Having the ability to use OOP does not imply that it's always the best solution, sometimes creating a separate class instead of using primitive types will just complicate things and make your code harder to support.