Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

ellipse, circle, rectangle, square, or parallelogram

Tue Feb 17, 2009 8:18 pm

Hi all,

Coming from a C++ background and now having to learn to code in java I've run into a little bit of trouble. The program I'm writing has to prompt the user to enter a Shape (either an ellipse, circle, rectangle, square, or parallelogram, or press 0 to quit), then have the user pick whether they want to find the area or perimeter.

Then you need to have the user enter the correct parameters, i.e. height/width for the area of a square, or the height x 2 + width x2 for the perimeter, or pie x (radius x radius) for the area of the circle / 2 x pie x radius for the perimeter, etc, etc, and finally have the program print the output

any help at all would be appreciated

thanks


Last edited by DrRakha on Tue Feb 17, 2009 8:55 pm, edited 1 time in total.
Reason: change title

Re: ellipse, circle, rectangle, square, or parallelogram

Tue Feb 17, 2009 8:56 pm

did you try anything , do expect us to do a full project for you ;)

Re: ellipse, circle, rectangle, square, or parallelogram

Tue Feb 17, 2009 9:05 pm

I've tried a few things, I can post the code I have when I get home in a couple hours. I wasn't looking for you to do the whole project, just give me a good starting point mostly

Re: ellipse, circle, rectangle, square, or parallelogram

Tue Feb 17, 2009 11:25 pm

just post the code and i will do my best to guide you :)

Re: ellipse, circle, rectangle, square, or parallelogram

Fri Jun 19, 2009 3:59 am

Or you can check the usage of this in the demo files. When you install java, these files will be installed in the package. It's complete with the codes. You can start ur project by analyzing it first. :)

Post a reply
  Related Posts  to : ellipse, circle, rectangle, square, or parallelogram
 Ellipse in Rectangle     -  
 Drawing circle using circle equation directly , on mouse     -  
 Drawing a Square in php     -  
 Draw Filled Ellipse in php     -  
 Java Rectangle Class     -  
 Draw Fill Rectangle     -  
 How to Calculate Volume of a Rectangle     -  
 Draw rectangle on image     -  
 Drawing rectangle using stars in java     -  
 Draw Oval,Arc,Polygon,string,Line,Round and 3D Rectangle     -