Tuesday:
HorseRacing_XML.zip
Nobel API Lab
The Nobel Prize site has a simple and free API (that also does not require an API key).
(https://www.nobelprize.org/nobel_organizations/nobelmedia/nobelprize_org/developer/
For example the (prize) url
http://api.nobelprize.org/v1/prize.json?category=medicine&year=1990
yields the json
{"prizes":[{"year":"1990","category":"medicine","laureates":[{"id":"442","firstname":"Joseph E.","surname":"Murray","motivation":"\"for their discoveries concerning organ and cell transplantation in the treatment of human disease\"","share":"2"},{"id":"443","firstname":"E. Donnall","surname":"Thomas","motivation":"\"for their discoveries concerning organ and cell transplantation in the treatment of human disease\"","share":"2"}]}]}
and the (laureate) url
http://api.nobelprize.org/v1/laureate.json?id=442
yields the json
{"laureates":[{"id":"442","firstname":"Joseph E.","surname":"Murray","born":"1919-04-01","died":"2012-11-26","bornCountry":"USA","bornCountryCode":"US","bornCity":"Milford, MA","diedCountry":"USA","diedCountryCode":"US","diedCity":"Boston, MA","gender":"male","prizes":[{"year":"1990","category":"medicine","share":"2","motivation":"\"for their discoveries concerning organ and cell transplantation in the treatment of human disease\"","affiliations":[{"name":"Brigham and Women's Hospital","city":"Boston, MA","country":"USA"}]}]}]}
Design an app that allows the user to enter a category (physics, chemistry, medicine, peace, literature
or economics) -- probably a spinner or set of radio buttons -- and a year. Then concatenate the corresponding
URL, read the JSON (remotely), parse it and display the first and last names of the laureates (AN ARRAY) as
well as the motivation.
Some students have been getting the categories from the json for all prizes. That's a fine approach and
good practice, but is more than I intended. The categories can be a a simple array in java or xml.
Due: Dec. 7
Project Start working on an idea for a project App.
- It cannot be what you are doing for another course.
- It must have at least two tabs.
- Something, data or image or youtube video, must be obtained dynamically from the web (e.g. use an API or use an image
from the web).
- In addition to spinner and button, you must get some input from the user in two other ways (e.g. EditText, Checkbox,
RadioButton, SeekBar, etc). And you must do something with that input.
- There should be logic -- unique to your app -- like a calculation or some game logic -- not
just a repeat of a lab already done.
- More criteria to follow. (If you had in mind a project that is challenging but doesn't
meet this criteria, we can negotiate.)
Due: Dec. 15