The petition affirmatively alleges and admits payment of a portion of the contract price, and seeks to recover the balance allegedly due for completion of West’s performance. We thus construe the petition as, suing for the final payment due under the agreement.
The construction contract for breach of which plaintiff seeks to recover is attached as an exhibit to the petition. It sets out an agreement that plaintiff would perform certain work “in strict accordance with” plans prepared by a firm denominated as “Architect.” Other provisions- of the contract especially material to a consideration of the defendants’ general demurrers are: “All work shall be done under the direction of the Architect and his decisions as to the true construction and meaning of the drawings and specifications shall be final . . . Contrae*606tor agrees to pay sub-contractor for said work the sum of [$36,180.00] . . . subject to additions and deductions as hereinbefore provided, payable as the work progresses, based upon estimates of the Architect and payment by Owner to Contractor . . . Final payment shall be made within 30 days after the completion of the work included in this sub-contract, written acceptance by the Architect, and full payment therefor by the Owner.” Plaintiff’s amended petition omits to allege facts showing or excusing written acceptance by the architect and full payment by the owner.
If the language quoted from the contract is construed as conditions precedent, the petition is fatally defective. Where the existence of a condition precedent affirmatively appears from the petition and exhibits to the petition, the failure to allege fulfillment of the condition precedent or legal justification for nonfulfillment renders the petition subject to general demurrer. Sellers v. City of Summerville, 208 Ga. 361, 366 (67 SE2d 137); Grahn Constr. Co. v. Pridgen, 49 Ga. App. 720, 722 (176 SE 656); Jenkins v. Gordy, 105 Ga. App. 255, 256 (124 SE2d 303); 5 Williston, Contracts (3d Ed. 1961) § 674, p. 179. “Conditions may be precedent or subsequent. In the former, the condition must be performed before the contract becomes absolute and obligatory upon the other party.” Code § 20-110.
Plaintiff contends that the defendants’ promise to pay was unconditional and that the above quoted portion of the contract merely specified the time when payment should be made. We cannot agree with that contention, for as we construe the plain and unambiguous language of the agreement, there are clearly expressed conditions precedent to defendants’ liability for the final payment of the contract price.
In the construction of a contract the cardinal rule is to ascertain the intention of the parties, and the court should consider the whole contract in arriving at the construction of any part. Code §§ 20-702, 20-704 (4); e.g., Hull v. Lewis, 180 Ga. 721, 724 (180 SE 599).
The contract evinces the parties’ intentions that plaintiff’s work should conform absolutely to the specified architectural standards: Plaintiff was to perform “in strict accordance with” plans drawn by the architect; all work was to be done under the *607direction of the architect; plaintiff was to be paid in installments according to progress of the work (in conformity with the required standards) as estimated by the architect. These provisions lend emphasis to our conclusion that the contract contained conditions precedent to liability fox final payment to the plaintiff that the payment be made “within 30 days after the completion of the work included in this sub-contract, written acceptance by the Archiect and full payment by the owner.” Written acceptance by the architect in itself is one condition precedent to liability for final payment. See 3A Corbin, Contracts (1960 Ed.) § 650, pp. 112-116; Ann. 54 ALR 1255; Ann. 110 ALR 137, 140.
In addition, the contract is open to the construction that possibility of the owner’s nonpayment on account of plaintiff’s work in the construction is the subcontractor’s risk rather than that of the prime contractor and that the owner’s payment to the prime contractor for the subcontractor’s work is yet another condition precedent to defendants’ liability, so that the plaintiff’s failure to- allege the owner’s payment to the prime contractor renders his petition further defective.
The trial court erred in overruling the renewed general demurrers to plaintiff’s petition. This ruling being determinative of the case it is not necessary to consider the remaining assignments of error.
Judgment reversed.
Frankum and Hall, JJ., concur.