Search:

Type: Posts; User: jamesh

Search: Search took 0.19 seconds.

  1. Replies
    4
    Views
    218

    [SOLVED] Re: Setter Methods Query

    Thanks worked straight away!
  2. Replies
    4
    Views
    218

    [SOLVED] Re: Setter Methods Query

    /**
    * Set insurance value of the football player
    */
    public void setInsuranceValue()
    {
    if (this.cost <= 10) {
    this.value = 5;
    } else if (this.cost >10 &&...
  3. Replies
    4
    Views
    218

    [SOLVED] Setter Methods Query

    Hi,

    I want to use a setter method to set the value of insurance that is set depending on the value of cost how would you do this?

    A little confused how to get this one to work :confused:
    ...
  4. Replies
    5
    Views
    219

    [SOLVED] Re: Information on toString()

    Hi Andbin,

    Thanks for that thought looked wrong! Got it working now.

    Thanks again.

    --- Update ---

    Hi Grey,
  5. Replies
    5
    Views
    219

    [SOLVED] Re: Information on toString()

    No I have not until now. Which I was able to do however once additing it into my toString() method as below



    public String toString()
    {
    return "This player name is" + playerName;
    ...
  6. Replies
    5
    Views
    219

    [SOLVED] Information on toString()

    Hi,

    I need to use the toString() to display some of the attributes about a class. However I have int values also that need to be displayed.

    Is there anyway to include these into the following?...
  7. Thread: Help

    by jamesh
    Replies
    1
    Views
    275

    Help

    Hi,

    Anyone got any ideas?

    I have to identify two classes of real-world objects relating to sports, games or arts and choose them such that it is natural to think of one class as an attribute of...
  8. Thread: Project help

    by jamesh
    Replies
    3
    Views
    268

    [SOLVED] Re: Project help

    No I can do the project I am just not sure what to make the project on relating to sports, games or arts that will allow me to do the above and was looking more for an idea of what to do the project...
  9. Thread: Project help

    by jamesh
    Replies
    3
    Views
    268

    [SOLVED] Project help

    Hi,

    Anyone got any ideas?

    I have to identify two classes of real-world objects relating to sports, games or arts and choose them such that it is natural to think of one class as an attribute of...
  10. Replies
    2
    Views
    226

    [SOLVED] Try-Catch Statement & Exceptions

    Hi,

    Can try-catch statement can only be used to handle checked exceptions?

    &&

    Are exceptions objects?
  11. Replies
    1
    Views
    213

    [SOLVED] If Statement Help

    Hi,

    I currently have the following code written

    /**
    * Checks if ball is touching or beyound the left- or right-hand boundary of the shapes window
    */
    public boolean...
  12. Thread: Assertion

    by jamesh
    Replies
    2
    Views
    192

    [SOLVED] Assertion

    When should you use assertions in your programs?
  13. Replies
    3
    Views
    149

    [SOLVED] Re: Try-Catch Statement

    Thanks Nor.

    If a method throws an exception is it first caught by the compiler?
  14. Replies
    3
    Views
    149

    [SOLVED] Try-Catch Statement

    Hi,

    Is the try catch statement used to catch syntax errors?
Results 1 to 14 of 14