static void Main(string[] args) { SavingsAccount objSavingsAccount = new SavingsAccount(); if (objSavingsAccount.AcceptDetails()) { objSavingsAccount.Display(); } else { return; } }
/// <summary> /// The entry point for the application. /// </summary> /// <param name="args">A list of command line arguments</param> static void Main(string[] args) { // Creating an object of the SavingsAccount class. SavingsAccount objSavingsAccount = new SavingsAccount(); if (objSavingsAccount.AcceptDetails()) { //Invoking the Display method of the SavingsAccount class. objSavingsAccount.Display(); } else { return; } }