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.

1 Visitor Messages

  1. HEY I NEED HELP WITH THIS.

    Write a programs that will prompt the user for a geometric shape (rectangle, square, triangle or circle) and the appropriate property (side, sides, radius), then return the area and perimeter (or circumference) of that geometric shape. Using a simple selection structure (if-else) may become very complicated, particularly if you have to modify the program later to include additional shapes. Organize the solution with series of user-defined methods and a menu which offers the user a series of choices using leters to identify letter options to identify the shape requested). Creating a menu of choices (which can also include the choice to terminate the program) might allow help to organize the program code.

    Notes:

    Input - The program should prompt user for a value corresponding to a shape (as listed below) & then for the properties specific to the shape selected. For example, if the user's response indicates a square, the program should prompt for one side, or if the user's response indicated a circle, the program should prompt for a radius.
    Processing - compute the area/perimeter for the shape requested.
    Output - The Area and Perimeter (or circumference) of the shape selected. The particulars are left to the programmer. Consider formatting the output for readability.
    The program should prompt user on a choice through a menu display and repeat 1 - 3 (above) for each time the user selects a shape (through a value of 1 to 4 - see below).
    The program should produce a "menu" of choices:
    Choice Shape
    1 Rectangle
    2 Square
    3 Triangle
    4 Circle
    5 Quit
    6 Enter Choice:
Showing Visitor Messages 1 to 1 of 1
About Ayokings2002

Basic Information

About Ayokings2002
Biography:
Computer science major in college
Location:
Elizabeth , nj
Interests:
Gaming, computers, cars
Occupation:
Student
Java Skill Level:
Beginner

Statistics


Total Posts
Total Posts
5
Posts Per Day
0.01
Visitor Messages
Total Messages
1
Most Recent Message
March 20th, 2013 11:09 PM
Total Thanks
Total Thanks
0
  • Thanked 0 Times in 0 Posts
General Information
Last Activity
March 22nd, 2013 04:01 AM
Join Date
February 28th, 2013

1 Friend

  1. Zyrion Zyrion is offline

    Member

    Zyrion
Showing Friends 1 to 1 of 1