JAVA programming assignment help

1. Write functions to compute the area and perimeter of a circle, rectangle, square, and triangle (so it will be six functions in total).

2. Use the above functions in the main method. In particular, do the following:

  1. (a)  Prompt the user to select a shape. If the user enters a choice that is not a circle, rectangle, square, or triangle, then your program should print an error message and terminate.
    Your program should be able to correctly interpret the user’s choice despite capitalization. That is, the user can enter “circle”, “CIRCLE”, “cIrCLe”, or any other combination of lower and upper case letters to express the user’s choice for a circle.

    Look at the documentation for String to see how you can compare two strings while ignoring case differences
    https://docs.oracle.com/javase/7/docs/api/java/lang/String.html

  2. (b)  After the user has selected the shape, prompt the user to select area or perimeter. Again, if a user makes an invalid choice, print out an error message and terminate the program. As before, your program should handle any combination of lower and upper case letters to express the user’s choice for area or perimeter.

  3. (c)  Afterwards,prompttheusertoenterthenecessaryparameterstocarryoutthecomputation.Forexample, if the user has selected circle and area, then your program should prompt the user to enter the radius. As another example, if the user has selected triangle and perimeter, your program should prompt the user to enter the length of each of the three sides.

    Print out the result of the computation. 

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.