About 786,000 results
Open links in new tab
  1. java - Implementing a Shapes application using the following …

    Nov 8, 2013 · Create a Shape interface which has an area () method which returns the area of the shape as a double. Create classes Circle and Rectangle which implement the Shape interface.

  2. Java - Calculate the area and perimeter of shapes - w3resource

    3 days ago · Write a Java program to create a class called "Shape" with abstract methods for calculating area and perimeter, and subclasses for "Rectangle", "Circle", and "Triangle".

  3. Java Program to Find Area of Square, Rectangle and

    Apr 26, 2022 · In this tutorial, we will learn how to find the area of squares, rectangles, and circles using method overloading. The area of the rectangle is the product of its length and …

  4. Java Program to find Area of Geometric Figures using Method …

    Write a Java program to find area of geometric figures using method overloading with an example. In this Java example, we will find the area of geometric figures such as Square, Rectangle, …

  5. Java Menu-Driven Program to Calculate the area of Geometrical Shapes

    Feb 15, 2023 · In this tutorial, we will write a Java program to calculate the area of various geometrical shapes using a menu-driven approach. The menu-driven approach provides a …

  6. Java Program to Find out the Area and Perimeter of Rectangle …

    Jul 23, 2022 · To find the perimeter of a rectangle or square you have to add the lengths of all four sides. x is in this case the length of the rectangle while y is the width of the rectangle. The area …

  7. Java Polymorphism - Shape Class with Circle, Rectangle, and …

    4 days ago · Write a Java program to create a base class Shape with a method called calculateArea (). Create three subclasses: Circle, Rectangle, and Triangle. Override the …

  8. Java Program to Find Area of Square, Rectangle and Circle ... - Sanfoundry

    This is a Java Program to Find Area of Square, Rectangle and Circle using Method Overloading. We declare three methods of same name but with different number of arguments or with …

  9. Geometric shapes - Exercises Java

    Nov 10, 2023 · In this lesson, you will explore how to use programming to create and draw various geometric shapes on the screen, from simple squares and rectangles to more complex …

  10. Shape Interface Implementation: Java Exercise - Interview Sansar

    Aug 18, 2024 · EXERCISE: Create a Shape interface having methods area () and perimeter (). Create 2 subclasses, Circle and Rectangle that implement the Shape interface. Create a class …