
4 P.3d 449 (2000)
197 Ariz. 394
In re TIMOTHY M.
No. 1 CA-JV 99-0064.
Court of Appeals of Arizona, Division 1, Department E.
February 10, 2000.
As Amended February 18, 2000.
Review Denied September 26, 2000.
*450 Richard M. Romley, Maricopa County Attorney By Rene Williams, Deputy County Attorney, Phoenix, for Appellee.
Law Office of Richard D. Coffinger By Richard D. Coffinger, Glendale, for Appellant.

OPINION
WEISBERG, Judge.
¶ 1 Timothy M. (the juvenile) appeals the juvenile court's dismissal without prejudice of a delinquency petition filed against him. We affirm.

FACTS AND PROCEDURAL HISTORY
¶ 2 On January 27, 1999, the juvenile's parents reported to the police that the juvenile and an accomplice had stolen their Dodge Caravan and some firearms and had run away from home. A few days later, upon seeing the stolen vehicle, the juvenile's mother called 911 and asked for police assistance in apprehending her son. Two Peoria plain-clothes police officers responded. While trying to flee, the juvenile drove the vehicle directly toward one of the Peoria officers, who was positioned in front of the vehicle with gun drawn, and who commanded "Stop, Peoria Police, Stop." As the van continued to move forward, the officer was forced to move out of its way. The juvenile later was arrested.
¶ 3 On January 30, 1999, the state filed a petition in juvenile court charging the juvenile with multiple delinquency offenses, including *451 aggravated assault of a peace officer, a class six felony. The juvenile denied the charges at the advisory hearing, and the court set an adjudication hearing for March 19, 1999.
¶ 4 In the period between the advisory hearing and the adjudication hearing, the prosecutor spoke with Peoria police and reviewed several hundred pages of material related to the incident. On March 5, 1999, he filed a motion to dismiss the January petition without prejudice because of "[n]ew evidence arising out of the incident [that] came to light after the petition was filed on January 30, 1999." At the same time, he filed an amended petition in juvenile court that elevated the aggravated assault to a class three felony[1] because it was committed with a "deadly weapon or dangerous instrument."
¶ 5 According to the juvenile's attorney, the prosecutor then advised that, with the concurrence of the victim, he would offer the juvenile a plea to the aggravated assault as a class three felony and that the state in return would dismiss the remaining charges. The juvenile's attorney informed the prosecutor that he would "prefer" to enter an admission to the charge of "endangerment of [the officer] as well as all the other counts in the amended petition, but that in order to ensure that the matter would remain in juvenile court, the juvenile would accept the State's plea offer and enter a plea of guilty or no contest to [the aggravated assault charge] of the refiled petition." No written agreement was ever drafted or signed by the parties as a result of these discussions.
¶ 6 On March 9, 1999, the state filed a motion to dismiss the March 5 amended petition[2] without prejudice because the charges were being pursued as an adult prosecution. The juvenile opposed the motion to dismiss, arguing that the previous delinquency petitions showed that he was amenable to treatment in the juvenile system and, further, that he was entitled to specific performance of the plea agreement that had been offered to him by the state. The juvenile court granted the state's motion to dismiss, and it is from that order that the juvenile appeals.
¶ 7 We have jurisdiction pursuant to Arizona Revised Statutes Annotated (A.R.S.) section 8-236(A) and Rule 24(a) of the Rules of Procedure for the Juvenile Court.

ISSUES
¶ 8 The juvenile raises three issues on appeal.
(1) Was the juvenile entitled to specific performance of the plea agreement initially offered by the state?
(2) Does A.R.S. section 8-302(C) require the juvenile court to dismiss without prejudice charges pending in the juvenile system when the state files those same charges in the adult system?
(3) Is the juvenile court required to hold a transfer hearing when the state moves to dismiss the charges in juvenile court in order to prosecute the juvenile as an adult pursuant to A.R.S. section 13-501?

DISCUSSION
¶ 9 We will not disturb the juvenile court's disposition unless we find a clear abuse of discretion. See Maricopa County Juv. Action No. JV-110720, 156 Ariz. 430, 431, 752 P.2d 519, 520 (App.1988). Also, although the court has broad powers to dispose of a matter, it may not "misapply the law or a legal principle." Maricopa County Juv. Action No. JV-510312, 183 Ariz. 116, 118, 901 P.2d 464, 466 (App.1995).

The Plea Agreement
¶ 10 The juvenile maintains that the oral exchange between his attorney and the prosecutor following the March 1999 petition *452 constituted his acceptance of a plea agreement. He argues that, because he "accepted" the state's plea offer before it was revoked by the state and before the state filed its motion to dismiss, it was binding on both parties. Therefore, he continues, the juvenile court erred in dismissing the petition and in not requiring specific performance of the plea agreement. In support of his argument, the juvenile cites "general principles of contract law" on offer and acceptance, and argues that the Rules of Criminal Procedure in general, and Rule 17 in particular, do not apply to juvenile pleas. We, however, disagree.
¶ 11 As a preliminary observation, we note that it is not entirely clear from the record that there was a real understanding as to what the parties were to have "agreed upon" following the prosecutor's offer of a plea to the class three aggravated assault. For example, the juvenile's attorney states that he informed the prosecutor that the juvenile would "prefer" to plead to all the "other counts" in the March 1999 petition and to the reduced charge of endangerment, but that he told the prosecutor that the juvenile would admit to the class three aggravated assault as charged, if that was necessary, to keep the action in juvenile court. In addition, the juvenile's motion opposing the dismissal of the March petition stated that the prosecutor had informed the juvenile that he would "consider" allowing the juvenile to enter a no contest plea to the aggravated assault charge, "but that he would have to receive authority from his supervisors to do so." The prosecutor, however, subsequently denied even agreeing to "consider" a no contest plea. To us, these exchanges seem more akin to negotiations rather than a final agreement between the parties. Nonetheless, even assuming offer and acceptance, we hold that there was no legally binding plea agreement.[3]
¶ 12 The juvenile argues that, once he accepted the state's offer, the plea agreement became binding under general principles of contract law and that the state could not then revoke its offer. Other than referring to the general contract provisions related to the termination of offers and formation of contracts found in the " `Restatement of the Law of Contracts, Second' by the American Law Institute," the juvenile cites only the United States Supreme Court's holding in Santobello v. New York, 404 U.S. 257, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971), as applying general contract rules to require the specific performance of a plea agreement. We, however, find that case to be inapplicable here.
¶ 13 The distinction between Santobello and this case is that in Santobello the plea agreement was binding because it had been accepted by the trial court. See id. at 258, 92 S.Ct. 495. Santobello did not even consider whether a plea agreement would be binding without having been accepted by the trial court. In fact, Santobello acknowledges that there is no right to have a guilty plea accepted and that under the federal rules a court may reject an agreement entered into by the parties. See id. at 262, 92 S.Ct. 495.
¶ 14 Our supreme court has similarly held that a criminal defendant's plea agreement is "subject to the approval of the trial court." State v. Morse, 127 Ariz. 25, 31-32, 617 P.2d 1141, 1147-48 (1980). It has also held that a plea bargain "can be revoked by any party at any time prior to its acceptance by the court." Id. at 32, 617 P.2d at 1147 (citing Rule 17 of the Arizona Rules of Criminal Procedure) (emphasis added).
¶ 15 Notwithstanding, the juvenile argues that the rules of criminal procedure do not control in juvenile cases. Therefore the juvenile maintains that Rule 17.4(b), which specifically provides that a plea agreement "may be revoked by any party prior to its acceptance by the court," does not control here. Instead, the juvenile would have us apply general contract principles in the juvenile system to make the acceptance of an offer the deciding element in the formation of a binding plea agreement, rather than its acceptance by the trial court as is the case with adult pleas. Once again, we disagree. *453 ¶ 16 We are guided by the tenet that juveniles must be afforded due process in the adjudication of charges against them. See In re Gault, 387 U.S. 1, 30-31, 87 S.Ct. 1428, 18 L.Ed.2d 527 (1967); Maricopa County Juv. Action No. JV-508488, 185 Ariz. 295, 299, 915 P.2d 1250, 1254 (App.1996). And, although the procedures that are followed in adult prosecutions are not uniformly applied to juvenile proceedings, they have been implemented in several areas. See, e.g., State ex rel. Dandoy v. Superior Court, 127 Ariz. 184, 187, 619 P.2d 12, 15 (1980); Matter of Maricopa County No. JV-114857, 177 Ariz. 337, 339, 868 P.2d 350, 352 (App.1993). In particular, criminal rules have been employed in juvenile proceedings when application has been necessary "to protect a juvenile's constitutional rights." JV-508488, 185 Ariz. at 299, 915 P.2d at 1254. Thus, to cite only a few examples, criminal Rule 11 has been applied to juvenile mental competency determinations, see Dandoy, 127 Ariz. at 188, 619 P.2d at 16; criminal rules governing dismissals have been applied to juvenile proceedings, see JV-114857, 177 Ariz. at 340, 868 P.2d at 353; and criminal rules governing revocation of probation have been followed in juvenile revocation of probation hearings. See JV-508488, 185 Ariz. at 301, 915 P.2d at 1256. As we have previously stated:
The application of [adult criminal] rules to juveniles charged with the commission of an offense is premised on concepts of due process, equal protection and fairness and not upon a belief that the rules governing prosecution of adults should apply. The Rules of Criminal Procedure only serve as a familiar vehicle to achieve due process ends.
Maricopa County Juv. Actions No. JV-119590 and JV-118201, 167 Ariz. 591, 593, 810 P.2d 589, 591 (App.1991).
¶ 17 In Pinal County Juv. Action No. J-985, 155 Ariz. 249, 250, 745 P.2d 996, 997 (App.1987), this court found that, because Gault required juveniles to be afforded the same protections as afforded adults in similar situations, the standards set forth in Boykin v. Alabama, 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969), for adult pleas were equally applicable to juvenile pleas. Thus, while we have acknowledged that the rules of criminal procedure, including Rule 17, may not always apply to juvenile guilty pleas, we have also required that the Boykin protections embodied within the rules be applied. See Maricopa County Juv. Action No. J-86715, 122 Ariz. 300, 303, 594 P.2d 554, 557 (App.1979).
¶ 18 Accordingly, we have held that, to be valid, the record of an admission in the juvenile system must reflect that the juvenile was aware of the right against self-incrimination, the right to confront accusers, and the right to a trial in the form of an adjudication proceeding, see id., all of which are due process protections incorporated in criminal Rule 17.1. We have further held that, as in the adult system, a valid admission of guilt in the juvenile system requires the finding of the existence of a factual basis for the admission that is supported by the record, see id., and that the admission be voluntary and not the result of threats or promises. These safeguards are analogous to those found in Rule 17.3, see In re Harry B., 193 Ariz. 156, 158, 971 P.2d 203, 205 (App.1998), and presuppose, as in the adult context, that it is the court that must conduct the hearing and personally address the juvenile to ensure that the plea agreement and consequent waiver of constitutional rights comport with all due process requirements.
¶ 19 Rule 17.4(b) provides that a plea agreement "may be revoked at any time prior to its acceptance by the court." Also, Rule 17.4(d) empowers the court to accept or reject that agreement, after determining that the defendant understands all of the plea agreement's terms, is in agreement with them, and that all of the terms and provisions are represented therein. We conclude that these protections must apply as a matter of due process and fairness in juvenile proceedings as well. To permit juveniles to be bound by the mere acceptance of an offer would give them less protection than that afforded adult defendants because it would not provide juveniles a similar opportunity to reflect on their decisions and reject them if second thoughts or other appropriate circumstances arose prior to the acceptance of a plea agreement by the court. Furthermore, *454 to conclude otherwise would negate the protections inherent in our requirement that the juvenile court ensure that the juvenile's due process rights have been observed in admitting guilt. We therefore hold that a plea agreement in the juvenile system may be revoked at any time by any party prior to its acceptance by the court.

A.R.S. Section 8-302(C)
¶ 20 The juvenile further argues that the juvenile court abused its discretion in failing to apply the doctrines of in pari materia and lenity to A.R.S. section 8-302 when granting the state's motion to dismiss the March 1999 petition. The doctrines of in pari materia and lenity apply only when a statute is deemed to be ambiguous. See State v. Pinto, 179 Ariz. 593, 595-96, 880 P.2d 1139, 1141-42 (App.1994) (when statutory language gives rise to different interpretations, court will adopt interpretation most harmonious with statutory scheme and legislative purpose and compare interpretation to other acts that are in pari materia); see also State v. Nihiser, 191 Ariz. 199, 201, 953 P.2d 1252, 1254 (App.1997) (because legislative intent is discernible, rule of lenity, if otherwise appropriate, is inapplicable). An ambiguity may be found to exist when there is uncertainty as to the meaning of the terms of a statute. See State v. Sweet, 143 Ariz. 266, 269, 693 P.2d 921, 924 (1985). However, if the language of the statute is clear and unambiguous, the court must give it effect without resorting to any rules of statutory construction. See Lewis v. Arizona Dep't of Econ. Sec., 186 Ariz. 610, 614, 925 P.2d 751, 755 (App.1996). Also, words and phrases in the statute are to be given their ordinary meaning unless it appears from the context of the statute, or of the act of which the statute is a part, that a different meaning is intended. See State v. Takacs, 169 Ariz. 392, 397, 819 P.2d 978, 983 (App.1991).
¶ 21 The state moved to dismiss the March 1999 juvenile court petition because it had decided to pursue the charges against the juvenile in adult court. A.R.S. section 8-302(C) provides that:
During the pendency of a delinquency action in any court of this state, on the motion of the prosecution and before the adjudication hearing, the court shall dismiss without prejudice any count in the petition charging an offense for which the juvenile is subject to prosecution as an adult pursuant to § 13-501 to allow criminal charges to be filed.
A.R.S. section 13-501(A) (emphasis added) provides that the prosecutor "shall bring a criminal prosecution against a juvenile in the same manner as an adult" when the juvenile is fifteen, sixteen or seventeen years of age and is accused of certain specific offenses, while section (B) (emphasis added) of the statute provides that the prosecutor "may bring a criminal prosecution against a juvenile in the same manner as an adult" if the juvenile is at least fourteen and commits certain specified crimes or is a chronic offender.
¶ 22 The juvenile contends that, because section 13-501(B) allows adult charges to be brought at the discretion of the prosecutor, its provisions somehow conflict with the provisions of section 8-302(C), which make the dismissal of a juvenile petition mandatory by the court. Thus, the juvenile reasons that the use of the phrase "shall dismiss" in section 8-302(C) is ambiguous and argues that the ambiguity should be resolved in his favor as not requiring dismissal of the juvenile petition. We, however, see no ambiguity.
¶ 23 A.R.S. sections 13-501(A) and (B) consistently entrust the filing of adult charges to the county attorney. In those instances specified in section 13-501(A), the county attorney is required to file the charges in adult court; in those specified in 13-501(B), he has the discretion to do so. Section 8-302(C) states that "during the pendency of a delinquency action in any court of this state," that court "shall dismiss without prejudice" any count in a petition in which the juvenile is subject to prosecution as an adult. Section 8-302(C) thereby requires the juvenile court to dismiss any charges pending at the time the state proceeded with those charges in the adult criminal court, even if a prior delinquency petition had been filed and was "pending." To interpret the statutes otherwise would lead to the absurd result of having *455 charges pending in two separate courts and raise possible issues of double jeopardy.

Transfer Hearing
¶ 24 The juvenile finally argues that the juvenile court abused its discretion in not holding a transfer hearing prior to dismissing the March 1999 petition. But the juvenile only cites authorities that pre-date the passage of A.R.S. sections 13-501 and 8-302(C) and are therefore inapposite. Furthermore, contrary to the juvenile's arguments, the county attorney does not "grant" the juvenile court jurisdiction by filing a petition with that court; our statutes do that. Thus, while the juvenile court may exercise exclusive jurisdiction and be required to hold transfer hearings when the county seeks adult prosecution in instances not covered under A.R.S. section 13-501, after the amendment of Article 6, section 15 of the Arizona Constitution and the enactment of A.R.S. section 13-501, it is no longer required to do so for prosecutions brought under that statute. As this court has acknowledged, and as the juvenile's counsel conceded at oral argument, the juvenile court and the superior court have concurrent jurisdiction over juveniles who commit crimes under A.R.S. section 13-501(B). See In re Cameron T., 190 Ariz. 456, 461-62, 949 P.2d 545, 550-51 (App.1997). As we noted in Cameron T., when the county attorney brings a prosecution under that statute, "the juvenile court has [the] authority to terminate its jurisdiction over a juvenile ... and the superior court has statutory and constitutional jurisdiction over felonies and misdemeanors committed by juveniles who are no longer under the jurisdiction of the juvenile court." Id. at 463, 949 P.2d at 552. Therefore, when the county attorney chose to prosecute the juvenile pursuant to A.R.S. section 13-501(B), A.R.S. section 8-302(C) required the juvenile court to dismiss the petition.

CONCLUSION
¶ 25 Because due process requires that the protections of Rule 17.4(b) apply to juvenile plea agreements, we affirm the trial court's dismissal order and hold that a juvenile plea agreement may be revoked by any party prior to its acceptance by the juvenile court. We also hold that A.R.S. section 8-302(C) requires the juvenile court to dismiss a delinquency petition pending before it when the county attorney seeks adult prosecution of the subject offenses pursuant to A.R.S. section 13-501.
CONCURRING: MICHAEL D. RYAN, Judge, and REBECCA W. BERCH, Judge.
NOTES
[1]  We note that, although the offense could have been filed as a class two felony, the petition listed it as a class three.
[2]  What motivated the state to seek prosecution as an adult is the subject of disagreement between the juvenile and the state and cannot be resolved from the record before us. While the juvenile ascribes it to the Peoria Police Department's having "pressured the County Attorney's Office" to prosecute the juvenile as an adult, the state maintains that it was the result of further examination of the available evidence, albeit at the victim-officer's request.
[3]  We acknowledge the concession of state's counsel at oral argument that an oral agreementnot reduced to writing and not containing all the terms and provisions typically contained in a plea agreementmay have existed.
