
536 Pa. 211 (1994)
638 A.2d 968
COMMONWEALTH of Pennsylvania, Appellee,
v.
Michael HARTMAN, Appellant.
Supreme Court of Pennsylvania.
Argued October 21, 1992.
Decided March 14, 1994.
*212 John W. Packel, Chief, Appeals Div., Stuart B. Lev, Philadelphia, for appellant.
Ronald Eisenberg, Deputy Dist. Atty., Catherine Marshall, Chief, Appeals Div., Alan Sacks, Philadelphia, for appellee.
Before NIX, C.J., and FLAHERTY, ZAPPALA, PAPADAKOS and CAPPY, JJ.


*213 OPINION

NIX, Chief Justice.
Appellant Michael Hartman was convicted by a jury of rape,[1] indecent assault[2] and simple assault.[3] After denying post-verdict motions, the Court of Common Pleas sentenced him to a term of four to fifteen years imprisonment. Appellant appealed his judgment of sentence to the Superior Court which affirmed in an unpublished memorandum opinion, 408 Pa.Super. 646, 588 A.2d 560. He subsequently sought allowance of appeal, which we granted. 528 Pa. 642, 600 A.2d 194 (1991). In his appeal to this Court, Appellant raises four issues for review and asks to be awarded a new trial. For the reasons that follow, we reverse the Order of the Superior Court in part and grant a new trial on the charges of rape and indecent assault.
Appellant's conviction arose out of the following set of facts. On the evening of May 8, 1987, Appellant paid a visit to his former girlfriend, Lillian Maldonado, and she admitted him into her home. During the course of the visit, sexual intercourse occurred between the two and there was a struggle that left Maldonado injured. Appellant claimed that the sex was consensual and that he injured Maldonado while defending himself against her attack. The prosecution contended that Appellant forcibly raped Maldonado.
Appellant seeks a new trial because his original trial purportedly had four defects which rendered the proceedings unfair. The first of these claims is that he was denied his constitutional right to due process when, after closing arguments, the trial judge, sua sponte, injected into the jury instructions a theory of guilt based upon Maldonado's mental capacity to consent under section 3121(4) of the Pennsylvania Crimes Code, 18 Pa.C.S. § 3121(4), after that theory had been expressly abandoned by the prosecution prior to trial. Appellant's theory is that the indictment and information was *214 constructively amended when the prosecution gave oral assurances that the section 3121(4) charge would not be pursued.
The Commonwealth contends that the trial judge committed no error because Maldonado's capacity to consent became an issue in the case when evidence of her retardation was admitted[4] and Appellant testified that they had consensual sex. The Commonwealth further claims that, because the indictment and information was never formally amended, the section 3121(4) offense offered a permissible basis for a conviction and, in light of the evidence admitted at trial, was properly included in the court's charge to the jury. In any event, the Commonwealth asserts that Appellant was not prejudiced.
Despite our conclusion that Appellant deserves a new trial on the charges of rape and indecent assault, we find it unnecessary to address the question as to whether the indictment and information was amended. Our decision is based solely on the fact that the judge acted in a way that denied Appellant a fair trial.
We begin by noting that the bill of information specifically included, inter alia, the charge of sexual intercourse with a person incapable of consent. 18 Pa.C.S. § 3121(4).[5] However, prior to trial, the trial judge determined that Maldonado's capacity to consent would not be an issue in the trial. This is clear from the following exchange.
MR. BRIDGE (Defense Counsel): The second reason we are requesting a [psychiatric evaluation] is regarding a potential issue which I need to put on the record . . . regarding prosecution for rape under Section Four which *215 would deal with a complaining witness being unable because of mental infirmity  [speaker interrupted by Court]
THE COURT: You're not proceeding under that section?
MR. McDANIELS (Assistant District Attorney): No, I'm not, Your Honor.
For the record, Kenneth McDaniels for the Commonwealth, we are not proceeding under that section. So, therefore, that issue may  [speaker interrupted by Court]
THE COURT: This is just straight out and out rape.
MR. McDANIELS: Straight out and out rape.
THE COURT: According to you.
MR. McDANIELS: According to me.
THE COURT: All right.
(N.T. 11/10/88, 7-8). The trial judge subsequently refused the request by the defense for an expert psychological examination of the victim.
Although the trial judge acted on the basis of his determination that Maldonado's capacity to consent would be irrelevant to Appellant's culpability, he sua sponte introduced the issue in his charge to the jury. The court instructed:
Now, the consent of the victim is a defense to the charge of rape. Consent is present if the victim at the time of the alleged crime is willing that the act take place and makes this willingness known to the defendant by words or behavior. The consent of the victim is not legally effective and is not a defense if the victim by reason of mental disease or defect is manifestly unable to make a reasonable judgment as to the nature or harmfulness of the conduct charged. The consent of the victim is not legally effective and is not a defense if it is induced by force or duress. The burden is on the Commonwealth, of course, to prove beyond a reasonable doubt that the alleged victim did not give consent. Thus, you cannot convict the defendant unless you are satisfied beyond a reasonable doubt that Miss Maldonado *216 did not consent, or if she did consent, that her consent was not legally effective.

(N.T. 11/16/88, 143-44) (emphasis added).
By interjecting the issue of the complainant's mental capacity into his instructions, the trial judge offered the jury a theory of guilt which was at odds with his earlier decision to exclude that very issue. More importantly, the instructions covered matters that the defense was precluded from addressing. This was a clear violation of Appellant's right to due process.
"While not capable of exact definition, the basic elements of procedural due process are adequate notice, opportunity to be heard, and the chance to defend oneself before a fair and impartial tribunal having jurisdiction over the case." Commonwealth v. Thompson, 444 Pa. 312, 316, 281 A.2d 856, 858 (1971). Appellant was denied these three basic elements of procedural due process at his trial on the rape and indecent assault charges.
First, he did not receive adequate notice of the charges for which he would be tried because the jury was instructed to consider the complainant's capacity to consent despite the fact that the judge indicated that Appellant's trial would not relate to charges for having sexual intercourse with a person incapable of consenting. Second, Appellant was denied an adequate opportunity to defend himself because the court refused his request to examine the complainant in order to rebut the charges contemplated by the jury instructions. Third, to the extent he was denied an opportunity to fully develop his defense, Appellant was denied an opportunity to be heard on issues that related to one theory of guilt submitted to the jury for its consideration.
We reject the Commonwealth's contention that the trial court's error did not prejudice Appellant. The Commonwealth's theory is that, because the jury found Appellant guilty of indecent assault, which, according to the court's instructions, requires a finding of nonconsent without reference to the victim's capacity, the jury determined that Maldonado *217 did not consent to have sex. That finding of nonconsent, the argument goes, necessarily precludes the possibility that she lacked the capacity to do so. This attempt to dissect the jury's decision to determine the validity of its verdict on the charge of rape amounts to nothing more than speculation.
When a court instructs the jury, the objective is to explain to the jury how it should approach its task and the factors it should consider in reaching its verdict. Commonwealth v. Wortham, 471 Pa. 243, 247, 369 A.2d 1287, 1289 (1977). When multiple offenses are charged, one factor may have a bearing on the defendant's guilt as to one offense but not as to others. In the case at bar, the trial judge indicated that the victim's capacity to consent was relevant to a charge of rape but not to a charge of indecent assault. Therefore, Appellant's guilt for indecent assault does not predetermine his guilt for having sex with someone incapable of consenting. Since we do not know whether the jury found Appellant guilty of rape on the basis of section 3121(4), an offense against which he was denied an opportunity to adequately defend himself, we find that the trial court's actions worked to his prejudice. See id. at 248, 369 A.2d at 1290 (quoting Commonwealth v. Ewell, 456 Pa. 589, 595, 319 A.2d 153, 157 (1974)). Even though the trial judge did not introduce the issue of the victim's mental capacity on the indecent assault charge, we find that the erroneous instruction on the rape charge was sufficiently prejudicial to warrant the grant of a new trial. We base our conclusion on the fear that the jury's determination of Appellant's guilt on the indecent assault charge may have been improperly affected by the trial judge's subsequent introduction of complainant's mental capacity. Thus, the convictions for rape and indecent assault must be reversed.
We must next consider the merit of Appellant's remaining allegations of error as they apply to his conviction for simple assault. Appellant contends that testimony from an investigating officer improperly bolstered the complainant's testimony at trial. Appellant also takes exception to the *218 reference to the officer's testimony by the prosecutor in the Commonwealth's closing argument.
Although Appellant's argument may have been relevant to the rape and indecent assault charges, it has no applicability to his conviction for simple assault.[6] Appellant admitted striking the complainant, claiming that he did so in self-defense. The jury heard the evidence and found Appellant's version unbelievable. Moreover, the officer's testimony related to the reason why the complainant omitted certain details about the alleged rape, and had nothing to do with the events which led to the simple assault charge.
Finally, Appellant asserts that he was denied his right to a public trial when the trial judge closed and locked the courtroom doors during the charge to the jury. This argument is simply without merit. We note that all who were present in the courtroom were permitted to remain; no one was removed. The trial judge simply ensured that the jury would not be distracted by the coming and going of courtroom spectators while he read the instructions to the jury. See United States v. Romano, 684 F.2d 1057 (2d Cir.1982), cert. denied, 459 U.S. 1016, 103 S.Ct. 375, 376, 74 L.Ed.2d 509 (1982) (citing Richmond Newspapers, Inc. v. Virginia, 448 U.S. 555, 581 n. 18, 100 S.Ct. 2814, 2830 n. 18, 65 L.Ed.2d 973, 992 (1980)).
We, therefore, conclude that Appellant's remaining challenges must fail as they apply to his conviction for simple assault.[7]
Accordingly, the Order of the Superior Court is reversed in part and affirmed in part. The judgment of sentence is vacated on the charges of rape and indecent assault. The judgment of sentence on the charge of simple assault is *219 affirmed. Appellant is granted a new trial on the charges of rape and indecent assault.
LARSEN, J., did not participate in the consideration or decision of this case.
ZAPPALA, J., concurs in the result.
NOTES
[1]  18 Pa.C.S. § 3121.
[2]  18 Pa.C.S. § 3126.
[3]  18 Pa.C.S. § 2701.
[4]  The prosecution introduced this evidence by eliciting testimony from lay witnesses following Maldonado's cross-examination. This was done to rehabilitate her credibility after an effort by the defense to impeach her.
[5]  The statute reads, in pertinent part:

A person commits a felony of the first degree when he engages in sexual intercourse with another person not his spouse:. . . .
(4) who is so mentally deranged or deficient that such person is incapable of consent.
18 Pa.C.S. § 3121(4).
[6]  It is noteworthy to point out that the offense of simple assault does not contain the element of consent. Therefore, the prejudice resulting from the court's erroneous jury instruction would not have affected the jury's determination of Appellant's guilt on the simple assault charge.
[7]  Our conclusion is bolstered by the fact that the conduct leading to the simple assault conviction occurred separate and apart from the conduct which led to the rape and indecent assault charges.
