Question: Can i get the code of this as well and the psuedo design with switch statement no boolean thank you…

rano Programming Project (Fall 2018) Due Date: CSC-117 java programming language Write a program to calculate the area of four shapes (Rectangle, triangle, circle and square). The program to present the user with a menu where one of the shapes can be selected. Based on the selection made, the user enters the proper input, the program validates the input (i.e all entries must be greater than zero) Once the input is entered and validated, the intended area is calculated and the entered information along with the area are displayed. Area of the Square Side A2 Area of the Rectangle Length Width Area of the Triangle h Base Hight Area of the Circle PI RA2 You MUST apply the following to your program: 1) An if else or a switch statement to present the selection menu 2) A loop to validate the input. 3) Formatted output. 4) Full documentation 5) The program is to rerun based on the users request (a loop to restart). Hand in the following: a) b) A detailed and precise design in pseudocode. (design must match 1 to 1 with the source code) A FULLY documented source code. Screenshots of all output scenarios. c) Can i get the code of this as well and the psuedo design with switch statement no boolean thank you

rano Programming Project (Fall 2018) Due Date: CSC-117 java programming language Write a program to calculate the area of four shapes (Rectangle, triangle, circle and square). The program to present the user with a menu where one of the shapes can be selected. Based on the selection made, the user enters the proper input, the program validates the input (i.e all entries must be greater than zero) Once the input is entered and validated, the intended area is calculated and the entered information along with the area are displayed. Area of the Square Side A2 Area of the Rectangle Length Width Area of the Triangle h Base Hight Area of the Circle PI RA2 You MUST apply the following to your program: 1) An if else or a switch statement to present the selection menu 2) A loop to validate the input. 3) Formatted output. 4) Full documentation 5) The program is to rerun based on the user’s request (a loop to restart). Hand in the following: a) b) A detailed and precise design in pseudocode. (design must match 1 to 1 with the source code) A FULLY documented source code. Screenshots of all output scenarios. c)

Expert Answer

answers

Hey,

Below is the pseudocode to your question

Don't use plagiarized sources. Get Your Custom Essay on
Question: Can i get the code of this as well and the psuedo design with switch statement no boolean thank you…
Get an essay WRITTEN FOR YOU, Plagiarism free, and by an EXPERT!
Order Essay
  1. PRINT the menu asking the user choice for shape
  2. Continue if user enters less than 1 or greater than 4
  3. If choice is 1 then ask for side and print area=side*side
  4. Else If choice is 2 then ask for side1 nd side2 and print area=side1*side2
  5. If choice is 3 then ask for base and height and print area=0.5*base*height
  6. If choice is 4 then ask for radius and print area=pi*r*r
  7. Ask user if he wants to continue
  8. If continue then make flag=0 else flag=1

Below is the code to your question

import java.util.Scanner;

import java.lang.Math.*;

public class SHAPES

{

public static void main(String[] args)

{

int choice=0,flag=0;

Scanner sc = new Scanner(System.in);

while(flag==0)

{

choice=0;

while(choice<=0||choice>4)

{

System.out.printf(“Press 1 for SquarenPress 2 for RectanglenPress 3 for TrianglenPress 4 for Circle”);

System.out.println(“Enter your choice: “);

choice=sc.nextInt();

  

}

if(choice==1)

{

System.out.println(“Enter side: “);

double side=sc.nextDouble();

System.out.printf(“The area the square is %.2fn”,side*side);

}

  

else if(choice==2)

{

System.out.println(“Enter side1: “);

double side1=sc.nextDouble();

  

System.out.println(“Enter side2: “);

double side2=sc.nextDouble();

System.out.printf(“The area of the rectangle is %.2fn”,side1*side2);

}

else if(choice==3)

{

System.out.println(“Enter base: “);

double side1=sc.nextDouble();

  

System.out.println(“Enter height: “);

double side2=sc.nextDouble();

System.out.printf(“The area of the triangle is %.2fn”,0.5*side1*side2);

}

else

{

System.out.println(“Enter radius: “);

double r=sc.nextDouble();

System.out.printf(“The area the circle is %.2fn”,Math.PI*r*r);

}

System.out.println(“Press 1 to exit”);

flag=sc.nextInt();

}

}

}

Copy > Run Run+URL (Generates URL as well .1 1.2 4.7 5.9 1.2 Time(sec): 0.13 Memory (MB): 55.4375 Output Copy Press 1 for Square Press 2 for Rectangle Press 3 for Triangle Press 4 for CircleEnter your choice: Enter side: The area the square is 1.21 Press 1 to exit Press 1 for Square Press 2 for Rectangle Press 3 for Triangle

Top Grade Homework
Order NOW For a 10% Discount!
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.

× Contact Live Agents