Код должен заставить пользователя ввести имя и фамилию.
using System;
namespace CSCI_231_Week3_Assn_8
{
class AccountTest
{
static void Main()
{
// Create an Account object and assign it to myAccount
AccountTest myAccount = new AccountTest();
// Display myAccount's initial name
Console.WriteLine($"Initial name is: {myAccount.GetName()}");
// Prompt for and read the name (First & Last) then put the name in the object
Console.Write("Enter your First & Last name: "); // Propts user to enter their first & last
name
string userName = Console.ReadLine(); // Reads the first & last name entered by user
myAccount.SetName(userName); // put userName in the myAccount object
// Display the name stored in the myAccount object
Console.WriteLine($"myAccount's name is: {myAccount.GetName()}");
}
}
}
Итак, я что-то пропустил, но что потерялось?