I am trying to write a document class highschool.cls for the high school research papers in our school based on the book.cls in order to make the format of the papers standardized. I am trying to define a signature page with heading ``CERTIFICATION'' such that the following text appears on the page.

To achieve this, I made the following definitions on LaTeX class highschool.cls.
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{highschool}
[2012/08/22 v0.1e
Standard LaTeX document class]
\newcommand\@ptsize{}
\newif\if@surnamea \@surnameafalse
\newif\if@surnameb \@surnamebfalse
\newif\if@surnamec \@surnamecfalse
\newif\if@firstnamea \@firstnameafalse
\newif\if@firstnameb \@firstnamebfalse
\newif\if@firstnamec \@firstnamecfalse
\newif\if@midinitiala \@midinitialafalse
\newif\if@midinitialb \@midinitialbfalse
\newif\if@midinitialc \@midinitialcfalse
\setlength\paperheight {11in}%
\setlength\paperwidth {8.5in}%
\setlength\textwidth {6in}%
\def\defenseDate#1{\gdef\@defensedate{#1}}
\def\surnamea#1{\gdef\@surnamea{#1}}
\def\firstnamea#1{\gdef\@firstnamea{#1}}
\def\midinitiala#1{\gdef\@midinitiala{#1}}
\def\surnameb#1{\gdef\@surnameb{#1}}
\def\firstnameb#1{\gdef\@firstnameb{#1}}
\def\midinitialb#1{\gdef\@midinitialb{#1}}
\def\surnamec#1{\gdef\@surnamec{#1}}
\def\firstnamec#1{\gdef\@firstnamec{#1}}
\def\midinitialc#1{\gdef\@midinitialc{#1}}
\if@compatibility
\renewcommand\@ptsize{0}
\else \DeclareOption{10pt}{\renewcommand\@ptsize{0}} \fi
\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
\ExecuteOptions{12pt,oneside,final,openright}
\ProcessOptions
\input{bk1\@ptsize.clo}
\def\signaturep{ %% signature page..
\topmargin 0in \headsep 0in
\begin{center}
\textbf{CERTIFICATION}\\[6pt]
\end{center}
This is to certify that this research paper entitled,
\textbf{``{\uppercase\expandafter{\@title}}''} and submitted by
\textbf{\uppercase\expandafter{\@firstnamea} \uppercase\expandafter{\@midinitiala}. \uppercase\expandafter{\@surnamea}}, \textbf{\uppercase\expandafter{\@firstnameb} \uppercase\expandafter{\@midinitialb}. \uppercase\expandafter{\@surnameb}}, and \textbf{\uppercase\expandafter{\@firstnamec} \uppercase\expandafter{\@midinitialc}. \uppercase\expandafter{\@surnamec}}
to fulfill part of the requirements for
the course Science and Technology Research II was successfully
defended and approved on \expandafter{\@defensedate}.
}%% signature page
\def\prelim{%%prelim page
\typeout{Making SMCT preliminary headings...}%
\pagestyle{plain}
\pagenumbering{roman}
\signaturep \newpage
\baselineskip=20pt
} %%prelim
\endinput
In my source TeX file, I would type something like
\documentclass{highschool}
\defenseDate{18 August 2012}
\title{This is the Title of the Paper}
\surnamea{Author}
\firstnamea{First}
\midinitiala{N}
\surnameb{Author}
\firstnameb{Second}
\midinitialb{N}
\surnamec{Author}
\firstnamec{Third}
\midinitialc{N}
\begin{document}
\prelim %% Prints Preliminary chapters
\end{document}
What I want to achieve is that
- when there are no
\surnameb,\firstnameb,\midinitialb,\surnamec,\firstnamec,and\midinitialcdeclared, I get the following text:

- when there are no
\surnamec,\firstnamec,and\midinitialcdeclared, I get the following text:

- and when all are declared, I get the text:

Is it possible to do this? If it is, how do I do it?



