Results 1 to 2 of 2
  1. #1
    allapologies is offline Member
    Join Date
    Apr 2013
    Rep Power

    Default Need help with java assignment

    Hello this is a Java assignment I've been given and I have no idea where to start, any help would be greatly appreciated.
    [Java] package; public class MyKalahGameState extends - This is the link to the code I've written so far and ill try to give an overview of what I need to do.
    So the assignment needs me to complete my own game state and a test class testing the private methods that I implement to ensure that the public methods which are in the link work as they should. I'm not allowed to add any more public methods. This is a completely new problem to me and without previous experience I'm finding it hard to know where to start or what to do.

  2. #2
    Ronin is offline Senior Member
    Join Date
    Oct 2010
    Rep Power

    Default Re: Need help with java assignment

    Trail: Learning the Java Language (The Java™ Tutorials)Hi allapologies, welcome to the forums.

    For a start you need to have a class called Player, there are numerous references to it.
    Things like line 13
    Java Code:
    Player playerA = playerA.getName();
    wont work, firstly because there is no getName() method, secondly, if there was chances are this would return a String.
    There are numerous declarations of Player playerA, Player playerB when there does not need to be. Each time you call this code it creates a new instance of Player when you what to refer to the existing two.

    Have a look through the tutorials for information on Java. If you have a specific problem then come back to us.
    Trail: Learning the Java Language (The Java™ Tutorials)


Similar Threads

  1. jAVA Assignment Help
    By tonespy in forum New To Java
    Replies: 6
    Last Post: 12-17-2012, 12:34 AM
  2. Java Assignment Help!
    By kudinspurs in forum New To Java
    Replies: 5
    Last Post: 12-07-2012, 09:19 AM
  3. Help with java assignment
    By jason3460 in forum New To Java
    Replies: 6
    Last Post: 12-04-2012, 10:47 PM
  4. Java Assignment
    By MichaelF144 in forum New To Java
    Replies: 34
    Last Post: 04-24-2012, 05:28 PM
  5. Java assignment.
    By jmsjames in forum New To Java
    Replies: 14
    Last Post: 12-07-2010, 03:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts