In this activity you will create an App that displays the current value of a company’s stock given its ticker symbol.
Create a new app that displays a text box with a button next to it like the following:
When the user taps the button, the app should display the current stock price for the ticker symbol in the text box, like the following:
The app should use theweb->download
function to download the the web page:http://finance.yahoo.com/q?s=xxxx
where
xxxx
is the ticker symbol of a company. Use the stringindex
function to find the location of the stock price in the web page’s HTML and use thesubstring
function to extract the stock price from the web page’s HTML.
Submission
Please show your source code and run your scripts for the instructor or lab assistant.