Forums Register Login

Jeopardy

+Pie Number of slices to send: Send
Hi guys
Basically, I'm a COMPLETE rookie in programming java and HTML.. Yet I promised my mother to try doing something for her.. I'm gonna make a jeopardy game for her..

The thing is that I've made the board, managed to make the questions etc.. Now I just need a way, to keep track of the scores.. Since I didn't know how to do it in HTML, but had a clue how to do it in java (read blueJ, since it's the only java program I know.. Don't be too hard on me, I know it's not real programming, I just wanna get some help). I managed to make a class called "Team" and some methods that added and subtracted points from from the objects..

Now I have 2 questions:

- Is there a way to implement this java class into a HTML-document with an "interface" or something, so I can just press a button to add / subtract points from the teams?
- Is there a way to make like a "digital number box" or something that keeps track of the score, so everyone can see the score. The score board should update automatically when I hit the buttons.

Hope someone inhere can help me out...
+Pie Number of slices to send: Send
Hi Rasmus, welcome to CodeRanch!

To make a webpage more interactive, you need to either use a client side scripting language like JavaScript, or do some server side programming. You can do the latter using Java servlets or PHP or other languages, but if you're new to making web applications, using servlets may be challenging at first.

Is there a reason that you want to make a web application as opposed to a Java desktop application, for instance?
+Pie Number of slices to send: Send
No not at all.. I just know how to make the board in HTML and how to make the basic coding in blueJ so thought i would start there and then later implement the java code in my HTML code... But I pretty much came to the conclusion that it's too hard for me.. However, if you have any other ideas feel free to share them, then I'll see if I can figure out how to do it
+Pie Number of slices to send: Send
Sadly, you won't simply be able to link the two together, as far as I know.

I would suggest to either make a text console based game in Java, and from there maybe work towards a Swing interface, or to learn PHP so you can use an HTML interface. It really depends on whether you want your game to be a desktop or a web application.
+Pie Number of slices to send: Send
It's only meant for desktop..
+Pie Number of slices to send: Send
Okay, so do you know how to work with Java without the use of BlueJ? Do you know how the command line compiler works?

If so, I suggest you start working on a model package for your application. It will contain all the logic you need to play a game, without worrying what the game will look like or how you will present it.
+Pie Number of slices to send: Send
No I only know it in bluej..
+Pie Number of slices to send: Send
Okay, then why not get started with it? If you know how to use the compiler and write full programs, it will be very useful for you, and on top of that, you can have a lot of fun.

Can you show us what you've accomplished with your game in BlueJ so far?
+Pie Number of slices to send: Send
Well basically, what I've done is make two classes, a game, and teams.. Teams can have some points (field variable), and I've made some methods that adds or subtracts some points from the variable team's points.. The class "Game" has an ArrayList that contains Teams, and it has a method that prints the team names and the points of each team... that's pretty much everything I know how to do
Grow a forest with seedballs and this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2059 times.
Similar Threads
Drag and Drop: what should my sources and targets be?
Explain OO -vs- Proceedural
UML tool for team development
My loop isn't working
Is HR totally insane?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:14:45.