Encrypted Chat Room 4

xiaoxiao2021-03-06  20

Class Clientset

This class represents a set of clients.

AttributesClients: Client []

Operation Specifications ClientSet ()

- Constructor

PRE:

POST:

Clients Has Been Created

Add (Client: Client): Boolean

- Add A New Client to The Set.

PRE: Client Is Valid

POST: IF

Client is successfully added to

Clientset True Is Returned

Else

False is returned

delete (name: string): Boolean

- delete the client with matching

Name from the set.

PRE: NONE

POST: IF

Client with matching

Name Was SuccessFully deleted

True is returned

Else

False is returned

Find (name: string): Client

- RETURN A Reference to The Client if aclient exissrs with match name.

PRE: NONE

Post: if aclient exissrs with match name

The Client Object Is Returned

Else

Null is returned

getClients (): client []

POST:

Clients Has Been Returned

转载请注明原文地址:https://www.9cbs.com/read-43870.html

New Post(0)