This sounds awful but I've never ever done programming before in my life and I'm being forced to design 2 games (or applications maybe..) One is supposed to evaluate a maths expression (using composite design method whatever that is...) and the second is a simple Connect 4 game using either a text based (better for me I think ..) or a GUI...I have absolutely NO idea even where to begin...do I import Java library classes..if so which ones would help? I feel so stupid but I've been doing this for 3 weeks now and I'm still at a loss as to where to begin - if ANYONE could give me any starting points, websites, useful books etc that may help I would be supremely grateful!! :)

Thank you!

Recommended Answers

All 3 Replies

Starting with the connect4...
I'm not sure how you are going to get it to play, I've been thinking about doing it too since I've finished my chess game:
http://www.colin-java.co.uk/JChess/index.htm
For a decent connect4 game, I think you should use alpha-beta pruning for your search, but deciding the evaluation function needs a little thought.
To be honest if you haven't done programming before or any game theory your biting off a lot more than is physically chewable.

To get started, you need a JFrame. Then with the JFrame, you get its contentPane, and add a JPanel object to it.
What I do is make a class that extends JPanel, this will override the paintComponent(Graphics g) method, which allows you to draw.

Also you will need one of your classes to implement mouseListener and mouseMotionListener, so that the program can respond to mouse events.

I'm not sure about the maths one, should be a lot easier, but problem is a little vague, and theres a lot of options possible.

I'll help you with both, but I need a little more information about what you know, and what you intend to do

First and foremost, you need to describe your problems. If you don't know what you're supposed to be making, you'll never make it.
Next turn that document into a more detailed functional design, stating what the user should be able to do and what the expected result will be at each stage.
Only then can you start thinking about ways to implement that, but in the abstract as algorithms and design patterns.

After that can come a period of selecting 3rd party components and libraries that can be of use.

Only after that should you start programming.

What? Why are you having problems? I think it would be helpful if you told us what course you're taking, and what expectations they have of you. Is this an intro compsci class? It sounds like it's not. You said in the other thread that you're a masters student in HCC. Human-Centered Computing?

So, tell us a few things:
1. What course you're taking, and what prior knowledge/experience this course expected of its students.
2. How many days you have to figure things out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.