Advertisement
sledx

Untitled

Jul 20th, 2019
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. package UMLCircle;
  2.  
  3. public class Circle {
  4.    
  5.     private double radius = 1.0;
  6.     private String color = "red";
  7.    
  8.     public Circle() {
  9.        
  10.     }
  11.    
  12.     public void Circle(double radius) {
  13.        
  14.     }
  15.    
  16.     public void Cirle(double radius, String color) {
  17.        
  18.     }
  19.    
  20.     public double getRadius() {
  21.         return radius;
  22.     }
  23.    
  24.     public String getColor() {
  25.         return color;
  26.     }
  27.    
  28.     public void setRadius(double radius) {
  29.        
  30.     }
  31.    
  32.     public void setColor(String color) {
  33.        
  34.     }
  35.    
  36.     public String toString() {
  37.         return radius + " " + color + ".";
  38.        
  39.     }
  40.    
  41.     public double getArea() {
  42.         return radius * radius * Math.PI;
  43.     }
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement