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 5 of 5

Thread: Help! For my high school son stuck

  1. #1
    Junior Member
    Join Date
    Sep 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help! For my high school son stuck

    Hello all. I'm a dad asking for help for my son who is taking his forst computer science class in high school. He is learning Java code. His project is to write code that draws something. Without knowing any better, he chose to write code to draw Timmy from the Fairly Oddparents. I'm attaching a picture of Timmy. He's already stuck, having just got the round eyes and the eyebrows figured out. The rest of Timmy seems to be irregular shapes. I think he's way over his head. Can anybody help him with Timmy? Or should I try to talk him into maybe Charlie Brown who is mostly circles I think.
    Mike
    Attached Images Attached Images


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Help! For my high school son stuck

    I don't mean to be rude, but part of learning how to program is learning how to do research on your own- you might be doing him a disservice by posting for him.

    That being said, I assume he's trying to draw the image as a series of lines and shapes (using the Graphics class), and not by directly using the drawImage() method?

    If that assumption is valid, then one of the best things you can do is get some graph paper. Your son should then use that graph paper to map out the Java coordinate system: (0,0) in the upper-left corner, (width, height) in the lower-right, etc. He should draw the image by hand on the graph paper, using the shapes available to him (lines, ellipses, rectangles, curves if he knows about those yet), and label each endpoint of each line, each corner of each rectangle or ellipse, etc.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Sep 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Help! For my high school son stuck

    Yes, he is trying to draw using lines and shapes. Yes, he has written code and created a grid already and has written code that draws the eyes and eyebrows on the grid. I don't know if he has mapped out the coordinates tho so I'll ask him. He's stuck because he does not know how to code for curves or other shapes he might use to draw the rest of timmy. I was hoping to point him to where to learn about drawing curves and irregular shapes.

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Help! For my high school son stuck

    Like I said, part of programming is learning how to look up these kinds of resources yourself. I'm really not trying to be rude, but I guarantee that the point of the assignment is to get the students googling "how to draw a curve in Java" or "how to create a gradient", stuff like that. Doing the research for him is probably less helpful than letting him figure it out for himself. I really recommend encouraging him to post himself and do his own googling, since that's the real lesson behind the homework. It's only going to get harder throughout the semester.

    Anyway, this is the first result for googling "java graphics curve", and contains a tutorial on how to draw curves: Drawing Geometric Primitives (The Java™ Tutorials > 2D Graphics > Working with Geometry)
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Junior Member
    Join Date
    Sep 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Help! For my high school son stuck

    No problem at all and thanks for the link

Similar Threads

  1. [SOLVED] My fleet of squares doesnt work (simple high school work)
    By macko939 in forum What's Wrong With My Code?
    Replies: 6
    Last Post: February 20th, 2014, 02:56 PM
  2. Help with high school java problem
    By maddiexc in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 5th, 2013, 03:32 AM
  3. High School Java Programming Class
    By SDennis52 in forum Collections and Generics
    Replies: 1
    Last Post: May 7th, 2012, 12:38 AM
  4. School java project, completely stuck
    By John1818 in forum Java Theory & Questions
    Replies: 0
    Last Post: November 18th, 2010, 04:10 AM