• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jeopardy  RSS feed

 
Rasmus Hansen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Stephan van Hulst
Saloon Keeper
Posts: 7973
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Rasmus Hansen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Stephan van Hulst
Saloon Keeper
Posts: 7973
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rasmus Hansen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's only meant for desktop..
 
Stephan van Hulst
Saloon Keeper
Posts: 7973
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rasmus Hansen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No I only know it in bluej..
 
Stephan van Hulst
Saloon Keeper
Posts: 7973
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Rasmus Hansen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!