Total members 11893 |It is currently Tue Nov 05, 2024 2:39 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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.
change title


Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time

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

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

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


Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time

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

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

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. :)


Author:
Newbie
User avatar Posts: 16
Have thanks: 0 time
Post new topic Reply to topic  [ 5 posts ] 

  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     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com