c++问题需要请教大家

我怎么看不懂啊,有哪位朋友可以提供下思路,我都不晓得从哪里开始写

img

// Client.h
#pragma once
#include <string>

using namespace std;

class cClient {
private:
    static string ServerName;
    static int ClientNum;
    static string Name;
public:
    static void SetServerName(const string& newServerName);
    static string GetServerName();
    static void SetName(const string& newName);
    static string GetName();
};

// Client.cpp

#include "Client.h"

string cClient::ServerName = "";
int cClient::ClientNum = 0;
string cClient::Name = "";

void cClient::SetServerName(const string& newServerName) {
    ServerName = newServerName;
}

string cClient::GetServerName() {
    return ServerName;
}

void cClient::SetName(const string& newName) {
    Name = newName;
}

string cClient::GetName() {
    return Name;
}

// Test.cpp

#include <iostream>
#include "Client.h"

using namespace std;

int main() {
    cClient::SetServerName("Server 1");
    cout << "Server Name: " << cClient::GetServerName() << endl;
    
    cClient::SetName("User 1");
    cout << "Name: " << cClient::GetName() << endl;

    return 0;
}