If you're wanting to do it via the Main method, then the most logical means is to receive the deposit/withdraw amounts as input from the user, which would be the case in a bank application. Then just simply output their input. As well, you could also create getters in your class for it.
Give me a moment and I'll type up example that depicts both ways.
EXAMPLE (DISPLAY VIA MAIN):
https://code.sololearn.com/c9hr3bwfWUFO/#cs
namespace SoloLearn
{
class BankAccount {
private double balance=0;
public void Deposit(double n) {
balance += n;
}
public void Withdraw(double n) {
balance -= n;
}
public double GetBalance() {
return balance;
}
}
class Program
{
static void Main(string[] args)
{
double depositAmount = 0;
double withdrawlAmount = 0;
BankAccount b = new BankAccount();
// Get user input for Deposit amount and display
depositAmount = Convert.ToDouble(Console.ReadLine());
b.Deposit(depositAmount);
Console.WriteLine("Deposit Amount: " + depositAmount);
// Get user input for Withdrawl amount and display
withdrawlAmount = Convert.ToDouble(Console.ReadLine());
b.Withdraw(withdrawlAmount);
Console.WriteLine("Withdrawl Amount: " + withdrawlAmount);
Console.WriteLine("New Balance: " + b.GetBalance());
}
}
}