Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Game's score app

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey everyone!

i have a school assignment on java, on which i must create a single class that works as a game's highscore.
This game consists on 4 teams of 2 members each, and each game is divided in 3 matches. In the game, each player
must throw a ball to try to knock a pin down (somewhat like bowling). If you knock the pin, you get 10points, otherwise if
your ball is the closest to the pin, you get 5points.

The java class is supposed to take up the teams' setup, and request the score of each play (for example player A vs
player B), and then show the scores for each turn (for example A vs B = Xpoints, C vs D = Ypoints). When the turn is
over, it should request the new teams. The app should end when all the teams have played against each other, and at
that time, it should show the final score from the first position to the last. If there is a draw, the team with more points
scored wins.

I think the assignment is supposed to be done mainly with arrays, and maybe fors/ifs/switches.

I'm a bit newb on this, specially when it comes to arrays, so any help would be wonderful, even if it is just how to start out, as i am out of ideas! Thanks!
Java Cowboy
Posts: 16084
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Oracle has a very nice set of Java tutorials. Here's one about arrays.
Liar, liar, pants on fire! refreshing plug:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic