Welcome Rage. Anger is useful. Better breathing, increased blood flow, higher brain activity. It is what you do with it that counts. muahahahah
The way I first understood oop was to forget the p. What is object oriented? Take real life examples. I want to build a house.
What is a house? A building of many rooms?
What rooms? Different rooms have different purposes.. but are also alike in many ways.
Now think about what all rooms have in common. A size. A shape. A door(i hope). A window(maybe?)
Now think about what you can do in all rooms. Open/close doors/windows.
Things which are common to all rooms would be listed here.
Now think about things that are specific to each room type:
Kitchen: Stove, Fridge, Oven, Cabinets. Things to do in a kitchen: Cook, clean, eat, drink
Bedroom: Bed, Closet. Things to do: Sit, sleep, watch tv, internet activity
Other rooms: etc.
Object oriented programming is the idea of organizing your data in a way that makes sense to the real world application. Given any problem to solve, if you relate it to the way people naturally interact with the problem, the hard part is over.
Back to the P:
public class Room {//we assume all these rooms will be simple rectangle shapes for now
private float sizeX;
private float sizeY;
private String door;
//etc
//constructor(s)
public Room(Door d, int x, int y) { //not very good names
//set variables
}
public void openDoor() {
//open door
}
public void closeDoor() {
//close door
}
//other methods
//getters n setters
}
public class Kitchen extends Room {
private String stove;
private boolean stoveIsHot;//true if hot
private String fridge;
private boolean fridgeIsCold;//true if cold
private String oven;
private boolean ovenIsHot;//true if hot
private ArrayList<Cabinets> cabinets;//where Cabinets is another class in the house building project most likely
//etc
//constructor(s)
public boolean isStoveHot() {
return stoveIsHot;
}
public void turnStoveOn(int degreesCelsius) {
//turn stove on to value degreesCelsius
}
public class Bedroom extends Room {
//etc
}
Once you have the objects organized, and the methods to act upon those objects, you can now get on to the procedural part.
public class HouseBuilder {
public static void main(string[] args) {
private Kitchen kitchen;
private Bedroom masterBedroom;
private Bathroom masterBathroom;
private Den den;
//call constructors for each room the house will get
kitchen = new Kitchen(new Stove, new Fridge, new Oven);
//organize those objects into a grid the size and shape of the building
//sell finished house for 100 times what it cost to build it
}
The idea is to keep all of your related data together in a place with the methods to act on the data. Have protected(meaning secure, not the keyword protected) access to the data. Hide how you do what you do to the data from the user of the class without making it difficult or confusing to use.
So if you get your thoughts all out on paper as you organize it, you already have your pesudo-code to work from.
Hope that helps