We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using System;
namespace Part2 { class Program { static void Main(string[] args) { Student student = new Student();
student.SetName("ali"); student.SetSurname("amiri"); student.SetPassword("Aa21354"); student.SetAge(16); Console.WriteLine(student.GetRole()); Console.WriteLine(student.GetName()); Console.WriteLine(student.GetSurname()); Console.WriteLine(student.GetAge()); Console.WriteLine(student.GetName()); } } class Student { private string name; //g s private string surname; //g s private int age; //g s private string role = "guest"; //g private string password; //s public void SetPassword(string value) { password = value; } //get public string GetRole() { return role; } //set public void SetName(string value) { name = value; } public string GetName() { return name; } public void SetSurname(string value) { surname = value; } public string GetSurname() { return surname; } public void SetAge(int value) { age = value; } public int GetAge() { return age; } }
} @
``
The text was updated successfully, but these errors were encountered:
No branches or pull requests
using System;
namespace Part2
{
class Program
{
static void Main(string[] args)
{
Student student = new Student();
} @
The text was updated successfully, but these errors were encountered: