Reference no: EM1360783
Create a Java program based on the geometric shapes example described at the beginning of this lesson using Classes Square, Triangle, Rectangle, and Circleto help describe inheritance and polymorphism using the perimeter() method. The program will calculate the perimeter of a designated shape.
The program should begin by prompting you for the shape you want to calculate the perimeter for-square, rectangle, circle, or triangle. You can designate 1-square, 2-rectangle, 3-circle, 4-triangle, and 5-Exit program.
Once you select your shape, then the program should prompt you for enough information to calculate the perimeter 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 perimeter, 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.
What would be the minimum coefficient of friction
: A tuning fork with a frequency of 356 Hz is found to cause resonance in a closed column of air at 41 cm and at 65 cm. Find the velocity of sound produced by the tuning fork.
|
Salaried versus waged
: What is your opinion on the quote, "Do laws interfere with or complement an employer's goal of using wage and salary (pay) plans to recruit, motivate and retain employees?"
|
Explain market structures of pure competition
: Discuss and explain the four market structures of pure competition, pure monopoly, monopolistic competition, and oligopoly.
|
Impacts of infertility on male-female and couples
: What are the impacts of infertility on male, female, and couples' sexual functioning. In addition, what effects can infertility and infertility treatment have in a couple's sexual life and behavior.
|
Create java program to describe inheritance and polymorphism
: Create a Java program based on the geometric shapes example described at the beginning of this lesson using Classes Square, Triangle, Rectangle, and Circ leto help describe inheritance and polymorphism.
|
Graphically show effect of increase in land under wheat
: Assume that major wheat producers in the world increased their land under wheat by 30 percent. Graphically show the effect of increase in land under wheat on the grain market.
|
Utilizing the scientific method
: How would you use the scientific method to identify the problem for the Michelin company and describe whether using the scientific method is helpful for identifying the safety issue.
|
Find the speed of sound in air
: The atomic number of lead is 82. The alpha particle is a helium nucleus, with atomic number 2.
|
Explain and prepare an efe and cpm matrix
: Explain and Prepare an EFE and CPM matrix for McDonald's Corporation using Burger King and Wendy's for competitors
|