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: 
In this case having a 2D array of Queens (separate class but without containing x,y coordinates) or booleans (indicating either a presence or absence of a queen) should be the correct choice. 
The reasoning is as follows:

* Queens as such do not have a position. You should design your objects (POJOs) independently of where they will be used and include as class members only properties that are relevant to them on their own.
* The positioning data has nothing to do with the queens and should be separated from them. Put in simpler terms, it is not a queens' job to take care of her position, but rather that of an external party (player, program, whatever). This is called **separation of responsibilities**.
* Most algorithms that you would like to use will be more difficult to implement and very hard to read and follow logically. Simple iterations of the board would be made impossible (or useless, at the least).

You will have to clearly define the role of each object in your system in order to be able to design it in a way that's both extensible & easy to work with. Not having a good idea of what exactly each object will be doing might lead to a wrong decision somewhere along the path, which itself will lead to more bad decisions down the road that deal with it until it becomes so bloated with hacks and workarounds that you would decide to start over :)
> 
> 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 is really two questions:

1. Should I store the queens' positions inside a single 2D array, or should I store the x/y coordinates for each queen?
2. Should I use a simple datastructure, or a class to hold this data?

The answer to 1. is, as pointed out by the other answers: It depends. Use the data structure that is easiest for the algorithms you need.

The answer to 2. is: Yes, I would always wrap the data structure (whichever you use, the list of coordinates or the array) in a class. Even if the class may sound trivial, if you use a class, it will be immediately apparent that you are storing positions. If you just use a 2D array, people will have to wonder what it does. Plus, you can have suitable methods in the class, enforce invariants (e.g. <10 queens) etc. ... all the OO goodness :-).