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

  Java enumeration lettergrade represent letter grades

Write a java enumeration LetterGrade that represents letter grades A through F, including plus and minus grades. Define a private instance variable holding a boolean value.

  Compilation and Execution - JAVA problem

Style marks are based on how your submitted code looks. Remember that good code is easily readable (and understandable) by someone who did not write it. For assignments, you should also include your name, student number, what course this is, what ass..

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Write a java program to implement the finite field

Write a program called "GF2.java" to implement the finite field GF(p n ) where p is a prime number and n is a positive integer.  You also need to write four methods to realize "+", "-", "´", and "/".

  File integrity checker - tripwire

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

  Prepare executable program and a dictionary program

Prepare executable program and a dictionary Program.

  Write a java program to register students for a college

Project is for designing and developing a College Registration program. Write a Java program to register students for a college

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Represent one book in java

Represent one book in java

  Java program to create a tree

Java program to create a tree, generate class - BottomUpTwoThreeFourTree, BottomUpTwoThreeFourTree,

  Java application to permit user to enter ten numbers

Write down Java application which permits a user to enter 10 numbers (double precision) into the array and then sorts and displays numbers from lowest to highest.

  Design a single class that expresses the commonality

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

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