namespace Module_9
{
public abstract class RailroadCar
{
//data fields
protected double length;
//constr
protected RailroadCar(double length = 0.00)
{
SetLength(length);
}
//GETTERS
/** Returns length of solid.
@return: solid length
*/
public double GetLength(double length) { return length; }
/** Updates length of solid.
@return: updated length.
*/
//SETTERS
public void SetLength(double length) { this.length = length;}
/** Calculates the volume of the solid.
@return: calculated volume of the solid
*/
public abstract double Volume();
}
}
namespace Module_9
{
public abstract class RailroadCar
{
//data fields
protected double length;
//constr
protected RailroadCar(double length = 0.00)
{
SetLength(length);
}
//GETTERS
/** Returns length of solid.
@return: solid length
*/
public double GetLength(double length) { return length; }
/** Updates length of solid.
@return: updated length.
*/
//SETTERS
public void SetLength(double length) { this.length = length;}
/** Calculates the volume of the solid.
@return: calculated volume of the solid
*/
public abstract double Volume();
}
}