The correct answer to this question is A, By using Static Resources. This technique would be used in the cloud-based software Salesforce. Static Resources allow content to be uploaded. This content can then be used as a point of reference on the Visualforce page.
The content can be anything such as style sheets, archives, and images. There are many advantages to using a static resource over uploading a document. For one, the files can be packaged together as a collection. This collection can then be uploaded as a hierarchy. Another advantage is the static resource can be referenced by name in page markup.
There are many circumstances where you could need to implement a connection from Salesforce to a third party API using Apex. Apex has an interface called HttpCalloutMocks for standard callout tests. You need first to create a visual force page and some Apex code to execute the HTTP Callout to a weather service’s API and then display the results.
An Apex Callout empowers you to integrate your Apex within external service my making a call to external web service or sending HTTP from Apex code and then getting the response. Apex delivers integration with web services that utilize SOAP and WSDL or HTTP services. (restful services)