0

Attached your will find my completed files, I only have one question about the parent class which is called GoeSolids
it has to be a generic geometric solid and i dont think I did that quite right. will someone be able to help me fix it?

import java.util.Scanner;
import java.text.DecimalFormat;


public class GeoSolids
{
 int radius;
 int height;

  public GeoSolids (int radi, int h)
   {
     radius = radi;
      height = h;
    }

  public GeoSolids ()
   {
     radius = 0;
      height = 0;
    }

  public void setRadius(int radi)
  {
   radius = radi;
  }

 public double getRadius()
  {
   return radius;
  }

 public void setHeight(int h)
  {
   height = h;
  }

 public double getHeight()
  {
   return height;
  }

  public String toString()
  {
   DecimalFormat fmt = new DecimalFormat("0.##");  
   String result = "The radius is " + fmt.format(radius) + "\nThe height is " + fmt.format(height);
    return result;

  }
}

Edited by mike_2000_17: Fixed formatting

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by dnmoore
0

You need to be a little more specific on your expectation for this "generic" base class. What do you believe is lacking or wrong?

0

You need to be a little more specific on your expectation for this "generic" base class. What do you believe is lacking or wrong?

like it has to define what all three geosolids i chose have in common
like i did for my sports program in my parent class all 3 sports had wins, losses, and ties.

for this geosolid i just dont know where to begin, i mean i began it but it doesnt seem right?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.