I’m new at object oriented programming and we are studying on a Java project. We have 4 friends and we don’t know how to share parts of this project. It will be probably a simple platform game or a board game. (This game would consist of players, balls, board, background, levels etc.) We are still learning OOP in Java, and we want to make the most of our programming knowledge. As I stated, I want to know how we can share (jobshare) parts of our project (For example if it is a platform game, I would write players, my 1. friend write background part, 2. friend write game’s engine(???) blablabla). Please help me how can we do this jobsharing and using classes? Thanks (btw sorry for my english)
Share
Okay, first of all you will need to make a proper design of your application:
Think carefully about what kind of game you want to create, write it down and then try to translate it into an object-oriented design. By that I mean, try to divide the program up into different objects that can be considered separate in the real world (like you said: players, etc.).
You should also think about how these different objects will interact later on. What messages will be sent between which objects? What are the expected results. From this, you can define some interfaces that you will have to implement.
Now, you and your friends can divide the work into separate parts and each implement a few classes. You can test your classes individually with some unit tests that you define (preferably before even implementing the class. Try to think of some edge cases, some usual cases, etc.) Once you are sure your classes work putting them all together shouldn’t be a problem.
Also, have a go at using a version control system like subversion or git. It helps a lot!
This definitely doesn’t cover everything and is possibly not even an adequate guide to object-oriented design but I hope it’ll get you started. Practice makes perfect 🙂