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

  Design a course registration system

Create an application which represents a simplified course registration system using ArrayLists and HashMaps.

  Java program to declares integer array

Write a complete Java program to declares integer array, intArray, and initialize it to {1, 2, 3, 4, 5, 6, 7}.

  Uml exercise

UML Exercise: Automated Teller Machine (ATM),   1. To allow authorized card holders to make transactions,   Brief Summary of Requirements:

  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.

  Write a recursive instance method

Write a recursive instance method

  Design and implement a small and simple email server

Design and implement a small and simple email server using the concept of web based information system (WBIS).

  Design and implement a small and simple email server

Design and implement a small and simple email server

  Java program which demonstrates cellular automata

Using the internet, locate a Java program (or Java applet) which demonstrates "Cellular Automata", in particular "the Game of Life".

  Function using javascript syntax to compute gross pay

Write a function using JavaScript syntax to compute a person's gross pay for a week. The function must receive the number of hours worked and the rate of pay per hour.

  Web engineering principles

web application development, Web Engineering methodology, UML-based Web Engineering (UWE), models to the expansion of web applications, Object Oriented Web Solutions (OOWS),Web Modeling Language (WebML) methodology, Object-Oriented Hypermedia Design..

  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.

  Implementation the two classes

Program Specifications: In the new implementation, the two classes, Student and Grades, are defined with the following operations/methods.

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