Create a java program to calculate the circumference

Assignment Help JAVA Programming
Reference no: EM1361082

Q1) Create a Java program based on the geometric shapes example described at the beginning of this lesson using Classes Square, Triangle, Rectangle, and Circle to help describe inheritance and polymorphism using the circumference() method. The program will calculate the circumference of a designated shape.

The program should begin by prompting you for the shape you want to calculate the circumference for - square, rectangle, circle, or triangle. You can designate 1-square, 2-rectangle, 3-circle, 4-triangle, and 5-Exit.

Once you select your shape, then the program should prompt you for enough information to calculate the circumference of the chosen shape. For example, if you select square then the program should prompt you for the length of one side of the square. If you select circle, then the program will prompt you for either the radius or diameter of the circle. With the information for calculating the circumference, have the program complete the calculation and print the information to the screen, using one of the JOptionPane output classes (methods) or any other graphical output method.

Reference no: EM1361082

Questions Cloud

Consumer patterns : how we can work on getting better statistical data that will show us the different patterns about our customers who are calling our 1-800 phone banks with different questions and problems.
Determine average investment in accounts receivable : The Allen Corporation has monthly credit sales of $600,000. The average collection period is 90 days. The expenses of production is 70% of the selling price.
Elucidate the effect on the us economy : Suppose that an unpopular president was leaving office, and a very popular candidate was elected, and this significantly increased the public's confidence in the future of the economy. Using the aggregate demand/aggregate supply model, elucidate t..
What determines first impressions : How do employers manage their employment brand and what determines first impressions?
Create a java program to calculate the circumference : Create a Java program based on the geometric shapes. The program should begin by prompting you for the shape you want to calculate the circumference.
Example of the standard american diet : Can I get a example of the standard american diet (including main foods found in the diet).
Explain and eliminate the conflict : Explain Do you have any suggestions for Sophia that may lessen or eliminate the conflict betweem her and Isaam?
Discuss soutwest delta airlines merger : Discuss Soutwest Delta airlines merger and describe the competitive environment within the industry. Is there a dominant firm.
Why did you select these predictive tools : Selection Process: Predictive Tools - Why did you select these predictive tools? Explain your answer with examples.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Technical community blog

Write a blog article for a coding/technical community blog

  Write a program to register students for a college

Students have names, addresses and courses. Implement the interface class RegisterStudent. RegisterStudent has one method, public boolean register, which returns the boolean value of true or false if the student is successfully registered for the ..

  File integrity checker - tripwire

Write a program that will perform some of the basic tasks accomplished by a file integrity checker such as Tripwire.

  Design a single class that expresses the commonality

Design a single class that expresses the commonality of these concepts.

  Java project

Prompt the user for an int between lower and upper boundary.

  Write a recursive instance method

Write a recursive instance method

  Java application to generate three-digit random number

Write a Java application that generates a 3-digit random number 100 times. Display the output for each of the generated numbers and the sum of all 100 numbers.

  User session mgr - socket and thread programs

User Session Mgr - Socket and Thread Programs

  Write a program that reads a set of floating-point

Write a program that reads a set of floating-point data values from the input.

  What position along the chord does minimum pressure occur

At what position along the chord does the minimum pressure occur? What is special about the point where C p is a maximum?

  Write java program that writes names to text file

Create an empty text file called myfile.txt. Write a Java program that writes your names to the text file created. If the file does not exist, include an exception handler for that error.

  Java program for line item application

This exercise explains you the process of testing and enhancing Line Item application. Open LineItemApp, Validator, Product, LineItem, and ProductDB classes that are in the c:java1.6ch06LineItem directory and review this code.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd