This discussion is archived
3 Replies Latest reply: Jan 17, 2013 7:23 AM by abillconsl RSS

Lots of questions! (Inheritance, UML design notation, Swing GUI, File handl

985348 Newbie
Currently Being Moderated
Hi everyone, just joined these forums and I hope to remain a long-time user across my degree!

I have been set an assignment and I'm a little confused about how to approach the requirements. I have to make a game which has:

1. Inheritance
2. UML design notation
3. Swing GUI
4. File handling

I have followed a tutorial and made a basic pong game, but I have no idea how I am going to integrate any of the above. If any of you can help me approach any of these requirements I would be very grateful! If you need the code I used I'll post that too.

Thank you very much!
  • 1. Re: Lots of questions! (Inheritance, UML design notation, Swing GUI, File handl
    PhHein Guru Moderator
    Currently Being Moderated
    Ask the people who gave you the assignment. Nobody will do it for you. Do you understand the requirements? Where are you stuck?
    Two links:
    http://homepage1.nifty.com/algafield/sscce.html
    http://catb.org/~esr/faqs/smart-questions.html
  • 2. Re: Lots of questions! (Inheritance, UML design notation, Swing GUI, File handl
    939520 Explorer
    Currently Being Moderated
    Here are a few suggestions (not very good, but it may give you some ideas):

    1. Inheritance: One idea is to alter your program to allow someone to easily expand it to support the creation of new types of games in the future. Create a base class that all games have (score, minutes spent playing, etc). Then a derived class that contains information specific to your current game. Someone creating a new game can create a new derived class.
    2. UML design notation: Create a UML diagram for the above inheritance.
    3. Swing GUI: Present a GUI interface for the user to interact with, rather than run the game on the command line.
    4. File handling: use file I/O to store the user's previous scores and times after they log off. Display them when they log back in.
  • 3. Re: Lots of questions! (Inheritance, UML design notation, Swing GUI, File handl
    abillconsl Explorer
    Currently Being Moderated
    936517 wrote:
    Here are a few suggestions (not very good, but it may give you some ideas):

    3. Swing GUI: Present a GUI interface for the user to interact with, rather than run the game on the command line.
    Hmmm, I was actually going to ask the OP what kind of display was being used for a pong game if it wasn't already a GUI.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points