
387 S.E.2d 760 (1990)
Todd W. MacCOY, et al.
v.
COLONY HOUSE BUILDERS, INC., et al.
Record No. 881150.
Supreme Court of Virginia.
January 12, 1990.
Robert B. Delano, Jr. (Temple W. Cabell, Sands, Anderson, Marks & Miller, Richmond, on briefs), for appellants.
E. Lewis Kincer, Jr. (Mezzullo, McCandlish & Framme, Richmond, on brief), for appellees Colony House Builders, Inc. and Thomas P. Sagun.
No brief or argument for appellee Harold Jones.
Present: CARRICO, C.J., COMPTON, STEPHENSON, RUSSELL, WHITING, and LACY, JJ., and POFF, Senior Justice.
STEPHENSON, Justice.
In this appeal, we decide whether the trial court erred (1) in ruling that an electrician was an independent contractor, as a matter of law, and (2) in refusing to rule that a builder's duty to comply with the *761 Uniform Statewide Building Code and the National Electrical Code is a non-delegable duty.
Todd W. and Laura W. MacCoy filed a motion for judgment against Colony House Builders, Inc. (Colony House), Thomas P. Sagun, and Harold Jones, alleging that Jones, as an employee of Colony House, negligently installed a service cable into an electrical panel box located in the MacCoys' garage. The negligent installation caused a fire that damaged the MacCoys' home. A jury trial ensued.
At the conclusion of the MacCoys' case-in-chief, the trial court struck the MacCoys' evidence, as it pertained to Colony House and Sagun, and entered final judgment for those two defendants. The MacCoys appeal from that judgment.[1]
The facts, relative to the issues in this appeal, are undisputed. Colony House, a corporation, constructs houses as a general contractor. Sagun is Colony House's president. Jones, trading as Chancellor Electrical Service, is a licensed electrician.
Jones and Colony House, acting through Sagun, agreed orally that Jones would perform all electrical work on the house that the MacCoys subsequently purchased (the MacCoy House). Jones had performed the electrical work in 22 new houses built by Colony House. Colony House furnished all materials to Jones.
As was the case with the other 21 houses, Jones and Colony House agreed on a price for the electrical work to be performed in the MacCoy House. This price was payable in two installmentsone-half of the agreed price when the electrical work had been "roughed in" and the balance when the work was completed.[2]
Colony House did not file an employee W-2 form with the Internal Revenue Service for monies paid to Jones. Colony House did not withhold income or social security taxes on Jones, nor did it provide Jones with health insurance, workers' compensation insurance, unemployment insurance, or any other benefits. According to Sagun, "[i]t was just a straight subcontract."
Colony House advised Jones what appliances, fixtures, outlets, and switches were to be installed and their location. So advised, Jones then determined the electrical load requirements for the house and made all electrical installations. Sagun testified that he knew nothing about electrical work. He testified further that after informing Jones "where everything was going," Sagun "would leave it up to [Jones] and [Jones] would know what size wires to get and everything as far as electrical goes." Sagun was present when Jones did the electrical work, and if Jones' work had appeared to him to be unsatisfactory, Sagun could have terminated Jones.
On February 2, 1982, the county building inspector inspected the MacCoy House and noted that more service cable needed to be installed in the electrical panel box. The inspector left the inspection report with Sagun who then gave it to Jones. Apparently, Jones remedied the problem because the inspector approved the electrical work after a subsequent inspection.
On December 31, 1985, the MacCoys' house caught fire and sustained substantial damage. Experts testified that the fire resulted from the installation of the electrical service cable in violation of the National Electrical Code, which is incorporated in the Uniform Statewide Building Code. The Commonwealth of Virginia has adopted both codes.

I
The MacCoys contended at trial that Jones was Colony House's employee and, therefore, under the doctrine of respondeat superior, his negligence is imputed to his employer. In striking the MacCoys' evidence, however, the trial court ruled as a matter of law that the doctrine did not apply because Jones was an independent *762 contractor, not an employee. The MacCoys contend that Jones' status, i.e., whether he was an employee or an independent contractor, was a jury issue, and therefore, the trial court's ruling was erroneous.
"`An independent contractor is one who undertakes to produce a given result without being in any way controlled as to the method by which he attains that result.'" Craig v. Doyle, 179 Va. 526, 531, 19 S.E.2d 675, 677 (1942) (quoting Epperson v. DeJarnette, 164 Va. 482, 486, 180 S.E. 412, 413 (1935)).
If under the contract the party for whom the work is being done may prescribe not only what the result shall be, but also direct the means and methods by which the other shall do the work, the former is an employer, and the latter an employee. But if the former may specify the result only, and the latter may adopt such means and methods as he chooses to accomplish that result, then the latter is not an employee, but an independent contractor.
Craig, 179 Va. at 531, 19 S.E.2d at 677 (quoting Kelley's Dependents v. Hoosac L. Co., 95 Vt. 50, 53, 113 A. 818, 820 (1921)). Accord Richman v. National Health Laboratories, 235 Va. 353, 358-59, 367 S.E.2d 508, 511 (1988); Va.Emp.Comm. v. A.I.M. Corp., 225 Va. 338, 347, 302 S.E.2d 534, 539-40 (1983); Richmond Newspapers, Inc. v. Gill, 224 Va. 92, 98-99, 294 S.E.2d 840, 843-44 (1982); Glenmar Cinestate v. Farrell, 223 Va. 728, 734, 292 S.E.2d 366, 369 (1982); Stover v. Ratliff, 221 Va. 509, 511-12, 272 S.E.2d 40, 42 (1980).
Ordinarily, whether one acts as an employee or as an independent contractor is a question of fact for a jury. Emmerson v. Fay, 94 Va. 60, 64, 26 S.E. 386, 387 (1896). A court decides the question only when reasonable minds could not differ. See Griffith v. Electrolux Corp., 176 Va. 378, 382, 11 S.E.2d 644, 646 (1940). Where, as here, a trial court strikes a plaintiff's evidence and rules as a matter of law that the relationship is that of an independent contractor and not master and servant, we must view the evidence and all reasonable inferences deducible therefrom in the light most favorable to the plaintiff.
The MacCoys rely on the following uncontroverted facts as evidence of control: (1) Sagun was present at the job site every day; (2) Sagun told Jones where the lighting fixtures, switches, and receptacles for major appliances were to be installed; (3) Sagun showed Jones where to install the electrical panel box; (4) Sagun specified on which of the 22 houses Jones was to work on a particular day and Sagun set the completion dates; (5) Sagun paid for the materials; and (6) Sagun informed Jones of the results of the first inspection. None of these facts, however, even when taken together, would justify an inference that Colony House had the power to control the means and methods of Jones' work. Sagun merely prescribed what the results should be. Jones was free to adopt and employ the means and methods necessary to accomplish the prescribed results.
Accordingly, we conclude that the trial court correctly ruled that Jones was an independent contractor as a matter of law. When the evidence and all reasonable inferences are viewed in the light most favorable to the MacCoys, reasonable minds must conclude that Colony House, acting through Sagun, neither had, nor exercised, the power to control the means and methods of Jones' electrical work.

II
Under the general rule, one who employs an independent contractor is not liable for injuries to third parties resulting from the contractor's negligence. We recognize, however, that there are exceptions to the general rule. See, e.g., Philip Morris, Incorporated v. Emerson, 235 Va. 380, 399, 368 S.E.2d 268, 278 (1988) (negligent hiring); Kesler v. Allen, 233 Va. 130, 134, 353 S.E.2d 777, 780 (1987) (dangerous instrumentality, etc.). Therefore, under some circumstances, an employer can be vicariously liable for an independent contractor's negligence under the doctrine of respondeat superior.
The MacCoys contend that even if Jones were an independent contractor, Colony *763 House, nonetheless, is liable. They claim that, because Jones violated the Uniform Statewide Building Code (Building Code), Code §§ 36-97 to -119.1, the so-called "wrongful per se" exception to the general rule applies. Stated differently, the MacCoys assert that, irrespective of Jones' duty not to violate the Building Code, Colony House owed a corresponding duty that was non-delegable.
We agree with the MacCoys that the violation of the Building Code, like the violation of any statute enacted to protect health, safety, and welfare, is negligence per se. See, e.g., VEPCO v. Savoy Const. Co., 224 Va. 36, 45, 294 S.E.2d 811, 817 (1982). The MacCoys, however, invite us to hold that whenever an independent contractor violates the Building Code, the "wrongful per se" exception applies and the contractor's employer is vicariously liable for the independent contractor's negligence. We decline the invitation.[3]
We considered the "wrongful per se" exception in Emmerson v. Fay, 94 Va. 60, 26 S.E. 386 (1896). In that case, an owner hired a contractor to construct a lumber dry kiln on the owner's property. The structure was located seven feet from a street. One of the contractor's employees dropped an iron ball from the building's roof that struck the plaintiff as she was walking down the street. The plaintiff contended, inter alia, that the work performed was wrongful per se, and therefore, the owner, as well as the contractor, was liable for her injuries. Rejecting this contention, we said that "[t]he contract ... was to do an act in itself lawful, and it is to be presumed in a lawful manner. It did not necessarily involve injury to any one [sic], hence the defendant cannot be held liable on this ground." Id. at 65, 26 S.E. at 388.
Since Emmerson, we have referred to the "wrongful per se" exception as the "unlawful" exception. See, e.g., Broaddus v. Standard Drug Co., 211 Va. 645, 649, 179 S.E.2d 497, 501 (1971); N & W Railway v. Johnson, 207 Va. 980, 983-84, 154 S.E.2d 134, 137, cert. denied, 389 U.S. 995, 88 S.Ct. 498, 19 L.Ed.2d 491 (1967). The "wrongful per se" exception arises only when the work to be performed is unlawful.
In the present case, like the employee and contractor in Emmerson, Colony House and Jones agreed that Jones would perform all electrical work in the MacCoy House. The agreement was for the performance of "an act in itself lawful." Moreover, Colony House had the right to assume that Jones would perform the work "in a lawful manner." Consequently, we reject the MacCoys' contention that the "wrongful per se" exception applies.
For these reasons, we will affirm the trial court's judgment.
Affirmed.
NOTES
[1]  The trial court also entered a judgment in favor of the MacCoys and against Jones in the amount of $68,094. That judgment is not the subject of this appeal.
[2]  Actually, Colony House paid Jones for work in the MacCoy House in three installments, to-wit: $538.72 on January 29, 1982, $96.67 on February 22, 1982, and $400 on March 8, 1982.
[3]  We note that Savoy Const. Co., relied upon by the MacCoys, is inapposite, as it does not address the "wrongful per se" exception.
