Search:

Type: Posts; User: JeremiahWalker

Search: Search took 0.10 seconds.

  1. Re: non-static method getDimensions() cannot be referenced ...

    Got it to work. Thanks.
  2. Re: non-static method getDimensions() cannot be referenced ...

    I declared the method and its associated variables static, but now I get this error:
    Rectangle.java:22: unreachable statement
    return perimeter;
    ^
    1 error
  3. Replies
    4
    Views
    1,930

    Re: Reusable classes.

    I was able to get this to work. Thanks for your help.
  4. non-static method getDimensions() cannot be referenced ...

    Doing some deeper study on classes and objects. The object here is to get the dimensions of a rectangle, and give the area and perimeter of the rectangle. the tester is giving me a compilation...
  5. Replies
    4
    Views
    1,930

    Re: Reusable classes.

    Time3Test.java:9: package com.walker.jhtp.reucla does not exist
    import com.walker.jhtp.reucla.Time3;//import class Time 3
    ^

    Time3Test.java:16: cannot access Time3...
  6. Replies
    4
    Views
    1,930

    Reusable classes.

    I am doing an exercise on reusable classes, but I can't seem to get it to work right. Here is the code
    Time3.java

    //Jeremiah A.Walker
    /**
    Steps for Declaring a Reusable Class
    Before a class...
  7. Replies
    2
    Views
    2,158

    Re: Sales not working

    THe bar chart should reflect the salary. I think I figured it out, but if you have some insight, I'd appreciate it. Thanks.
  8. Replies
    2
    Views
    2,158

    Sales not working

    Hi:
    So, in my pursuit of learning programming, I am writing a program that takes Sales Information, gives back the total, average and pay(commission is 9% of total sales + 200).

    I want to create...
  9. Replies
    1
    Views
    1,499

    My bullseye won't show

    I'm working on a java assignment that requires me to draw a bullseye using Java.
    I think the code is straight, but it would draw anything--it just gives me a blank screen.

    Any help is appreciated...
  10. Replies
    1
    Views
    1,418

    More number theory

    Some code examples. I think I will focus on more useful and practical code from now on. I'm pretty sure noone cares about number theory. Can you guys give me a little insight as to how to...
  11. Replies
    8
    Views
    1,833

    Re: From python to java

    My background is actually in IT, and in that field we don't really focus on programming. We are mostly responsible for implementing solutions. I want to learn programming to become more well...
  12. Replies
    8
    Views
    1,833

    Re: From python to java

    Is it possible to reach in to the primes array and grab primes[max] to be able to print the "nth" prime number
  13. Replies
    8
    Views
    1,833

    Re: From python to java

    Here is one using the Sieve of Eratosthenes. I found the algorithm on wikipedia.
    I'm going to translate it to python


    //Jeremiah A. Walker
    //Prime number generator
    //Java
    //Sieve of...
  14. Replies
    8
    Views
    1,833

    Re: From python to java

    good point. I actually wrote that program when I was first starting out in programming.
  15. Replies
    8
    Views
    1,833

    From python to java

    This is a program to generate all prime numbers between 0 and a given number(y). Is it possible to "translate" this program to java? The assignment calls on me to do this in java and I see no need...
  16. Replies
    6
    Views
    1,168

    Re: Help me improve my code.

    Thanks a lot. I'll keep practicing
  17. Replies
    6
    Views
    1,168

    Re: Help me improve my code.

    Thanks a lot. I'll keep practicing
  18. Replies
    6
    Views
    1,168

    Re: Help me improve my code.

    Thanks and how would you write that?
  19. Replies
    6
    Views
    1,168

    Help me improve my code.

    Hi. I'm still studying my programming and am looking for ways to keep my code more readable and less redundant. This is my latest exercise. It runs and executes the way I want it to, but I have a...
  20. Re: Employee class won't set salary and number values

    Thanks for the suggestion, can you show me the code?
  21. Employee class won't set salary and number values

    I'm new to Java and I'm writing a sample code wherein a user inputs employee info (name, position and monthly salary--which also calculates annual salary by doing monsal * 12). My set constructors...
Results 1 to 21 of 21