Need help with property in method

Things is that we need to do the following:
A - Write a class, Sphere, which has one private field of the type integer which represent the radius of the sphere.
B - Write a default, empty, constructor and a constructor that takes one parameter, the sphere’s radius.
C - Write a property that allows the class user to modify the radius.
D - Write methods that calculate the volume of the sphere.

Well i have started and I think I got it right until part D, I dont know how to use the method i get from the user in a metod. How to pass it's value into the metod, run the calculation and then return it to the user.

You have C right, the rest are wrong. None of the class methods should have Console anywhere in them.

A) private variable that store radius. You don't have one
B) You have an empty constructor, but where is the one that take ONE parameter (and stores it in the private variable, that's what the private variable is for).
C) You have this right but, usually, properties begin with an upper case character (style issue)
D) You have no method that calculates the volume of the sphere and returns that value (something like public double Volume() {

class Sphere
{
/// <summary>
/// A - Write a class, Sphere, which has one private field of the type integer which represent the radius of the sphere.
/// </summary>
private int radius;
/// <summary>
/// B - Write a default, empty, constructor and a constructor that takes one parameter, the sphere’s radius.
/// </summary>
public Sphere()
{
//set default for radius, say maybe one or zero
radius = 1;
}
/// <summary>
/// B - Write a default, empty, constructor and a constructor that takes one parameter, the sphere’s radius.
/// </summary>
/// <param name="radius">a radius you optionally get to initialize your object</param>
public Sphere(int radius)
{
//now that you got it, what do you wanna do with it? test it f its valid?
//or just use it? thats besides the point, what matters is when csc reaches here, you got it
//i'm just gonna do this
this.radius = radius;
}
/// <summary>
/// C - Write a property that allows the class user to modify the radius.
/// </summary>
public int Radius
{
get { return radius; }
set { radius = value; }
}
/// <summary>
/// D - Write methods that calculate the volume of the sphere.
/// Just wrote it wrong, just demonstrating, i don't do math so i dnt even knw a single applicable math
/// you will change it to whateva you have to
/// </summary>
/// <returns>a double valume value for your Sphere</returns>
public double CalcVolume()
{
return radius * Math.PI;
//thus after initializing an object of this type
// you can simply call this method as
//Sphere myS = new Sphere(25);
//Sphere mySS = new Sphere();
//double vol1,vol2;
//vol1 = myS.CalcVolume();
//etc
}
}

This should help, and in future, try read and understand the problem domain then tickle each one by one in an OOP manner. that will better help you solve your coding problems faster and easier.

@mshauny: Nice effort:yawn: Now all the OP has to do is copy and paste and in the process of doing so will have learned nothing.
BTW maby the math in your country is quite different than in mine, but here we calculate the volume of a sphere as being :( 4 / 3 ) * Math.PI * Math.Pow( radius, 3.0)
or( 4 / 3 ) * Math.PI * radius * radius * radius

There are somethings i did wrong in the code. And yes i made a mistake showing him the full code, but he will learn from it atleast, just this once let him learn from other's work. I strongly believe people can benefit alot from open sourced codes, we should'nt be too hash on them just because we learned programing the hardway, besides its now pointless to hide code from a Windows .NET developer using tools like VS because it virtually explains everything to them. I'm sorry though, thats just how i teach my fellow students.

On the Math part, Its not about country to country application. I'm not a math person indeed. Thanks for the Volume formular, i just did a dummy calculation to demonstrate a point not to be precise.