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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  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..

  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.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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