Results 1 to 4 of 4
  1. #1
    hashey100 is offline Member
    Join Date
    Nov 2011
    Posts
    2
    Rep Power
    0

    Default need help with my basic java calculator code

    hi im stuck :( and new to java

    this is my basic calculator im trying to test the + - x and / functions but my class needs to be abstract and i dont know how to test it. The aim of void test is to
    Last edited by hashey100; 11-12-2011 at 05:55 PM.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: need help with my basic java calculator code

    Perhaps the abstract class needs an abstract method, say calculate(...) that takes two double parameters and returns a double?

  3. #3
    hashey100 is offline Member
    Join Date
    Nov 2011
    Posts
    2
    Rep Power
    0

    Default Re: need help with my basic java calculator code

    my assignment was to have a abstract class with a test method which returns the value and then have non-abstract subclasses consiting of + - / and * . I was also asked to have a test class but im confused as hell :( . i made my code but when i try test it it doesn't seem to recognize the methods in the addition subclass for some strange reason

    thanx for the input
    Last edited by hashey100; 11-12-2011 at 05:47 PM.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: need help with my basic java calculator code

    Please show your actual assignment instructions (and please watch your language -- we have young Java students who frequent this forum).

Similar Threads

  1. Basic Calculator
    By Bimz in forum New To Java
    Replies: 13
    Last Post: 09-09-2011, 11:47 AM
  2. Basic Java Calculator Code Problem
    By SerbianSergeant in forum New To Java
    Replies: 7
    Last Post: 07-22-2011, 02:50 PM
  3. help with basic sum calculator in java
    By java157 in forum New To Java
    Replies: 8
    Last Post: 03-18-2011, 12:12 AM
  4. Basic Calculator
    By trtoy in forum New To Java
    Replies: 1
    Last Post: 12-25-2009, 02:06 AM
  5. Basic Calculator
    By Rose88 in forum Java Applets
    Replies: 3
    Last Post: 06-25-2009, 01:34 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
  •