Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Print ruler info

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Print ruler info

    I posted an attachment describing what I need to do, and yes it is homework. I only need help on part one though. I've already done the other parts. To be honest I'm drawing a blank as to how to proceed and don't really have much.
    This is what I have so far:

    public static void recRuler(double x, double y, double w, double h){
    		if(h > 2){
    			System.out.println(w/2 + " " + h);
                            recRuler(x, y, w/2, h/2);
    		}
     
    	}
    }

    Like I said, I'm drawing a blank :/
    Thanks in advance.
    Attached Files Attached Files


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,524
    My Mood
    Mellow
    Thanks
    156
    Thanked 615 Times in 602 Posts

    Default Re: Print ruler info

    Welcome to the Forum! Please read this topic to learn how to post your code correctly along with other useful info for newcomers.

    It may be in the above link, but please don't expect us to read links or attachments to figure out what it is you need help with. State it plainly, something like: "I need to do <this>, I have tried to do <this>, and I am getting <these errors or these undesirable results>," posting as much info as you think will be needed for us to understand what you need help with.

Similar Threads

  1. Need help with printing out info
    By Diesel298 in forum Object Oriented Programming
    Replies: 4
    Last Post: October 4th, 2013, 12:17 PM
  2. Replies: 1
    Last Post: December 3rd, 2012, 01:35 PM
  3. How to get info from ListFragment
    By mellomel70 in forum Android Development
    Replies: 0
    Last Post: November 16th, 2012, 03:50 PM
  4. Date info
    By deependeroracle in forum Java Theory & Questions
    Replies: 1
    Last Post: March 14th, 2012, 05:36 PM

Tags for this Thread