List all overloading methods (including constructors) in this coding..

public class Circle {

private double radius;
private String colour;

public Circle()
{
radius = 0;
colour = "";
}

public Circle (double r)
{
radius = r;
}

double getRadius()
{
return radius;
}

double getArea()
{
return Math.PI * radius * radius;
}

public String toString()
{
return "Aread of a circle with radius " + radius + " is " + getArea();
}
}

public class Cylinder extends Circle {
private double height;

public Cylinder ()
{
super();
height = 0.0;
}

public Cylinder(double height) {
super();
this.height = height;
}

public Cylinder(double radius, double height) {
super(radius);
this.height = height;
}

public double getHeight() {
return height;
}

public double getVolume() {
return super.getArea()*height;
}
}

1 answer

HAHA NOOB.
Similar Questions
  1. using System;namespace IPayable { public interface IPayable { double GetFigure(); } public class Invoice : IPayable { private
    1. answers icon 1 answer
  2. public class Circumference {/** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub ;
    1. answers icon 0 answers
    1. answers icon 0 answers
    1. answers icon 8 answers
more similar questions