Ordered pairs in NBG set theory I'm reading a set theory textbook by Pinter, and this book follows the spirit of NBG set theory and talks about sets and (proper) classes in a very early stage. This is quite satisfactory because the book can (and does) talk about 'functions' whose domains are classes, and 'partially ordered classes' and so on.
But the problem is, when Pinter defines functions, he goes on like

A function is a triple of objects $<f,A,B>$ such that...

and similarly, he also says

By a partially ordered class we mean a pair of objects $<A,G>$, where...

without defining what 'a triple of objects' and 'a pair of objects' is.
Of course, this is not a 'serious' defect, but as a set theory book, this is not quite satisfactory. He had given the Karatowski definition of an ordered pair early on,

$(a,b):=\{\{a\},\{a,b\}\}$

but it is clear that this does not make sense when $a,b$ are proper classes. For similar reasons, defining a triple of objects as $((a,b),c)$ would not work.
Is there a way to explain all this in a satisfactory manner?
P.S. This reminds of the situation I had faced when learning category theory for the first time. Almost every algebra or algebraic topology books define category by saying "a category consists of following three data..." without explaining what 'data' really is. Of course this is also not a serious defect when learning, say, algebraic topology, but I would like to resolve the curiosity that I've always had.

There is a useful generalization of this: One can encode a class-valued function  as an object by flattening it to the relation $R_f$ given by
$$ y \in f(x) \Longleftrightarrow (x,y) \in R_f $$
So if you encode an ordered pair as a function $\{ 0, 1 \} \to \mathbf{Cls}$, this transposition into a relation gives the encoding described in the other posts.
This is maybe more appealing in a functional formulation. Any class may be viewed as a function $\mathbf{Set}\to \{ \text{true}, \text{false} \}$. Therefore, any function $f:S \to \mathbf{Cls}$ can be transposed into a function $g:S \times \mathbf{Set} \to \{ \text{true}, \text{false} \}$ given by
$$ g(x,y) = f(x)(y) $$ 
