Comp 152 Project 5:
Teams, APIs, third party libraries and a bigger project
Due: Sun Dec 12th at 11:59pm
(with Thanksgiving in between now and then, this is not that long away)
Intermediate deliverable Due Date: Nov
23rd/24th in class.
Summary:
This project will give you a chance to work with json, RESTful apis,
windowed programs with JavaFX, and learn a bit from documentation.
Project:
You will work in groups of three (except for the odd numbered groups when
the class size mod 3 isn't zero)
All students in a group need to be working
on the same github version of the project. So the person setting up
the project will need to invite the other group members as
collaborators
- Make a window which run first and provide a way to select the other
windows below.
- Everybody in the group is responsible
for the original window. Each person should build out their
own method to handle opening a new window. Be sure to communicate with
each other so that you don't mangle each others work. Each student in
the group needs to push their own commit or make a pull request to
make include their own part of this window and event handlers.
- I will be assigning credit on this project for github commits/pull
requests, so everyone in the group has to make their own commits and
pull requests.
- Each person will then choose one of the possibilities below, claim it,
and implement it.
- Query the specified API, retrieve the data, and display it on a
JavaFX window that has a good control layout to be able to see all of
the data in an easy to understand manner.
- Each of these smaller windows should use the Model View Controller
pattern with at least three classes, one for each.
Possible APIs and windows (each person in the group needs to pick one -
not more than one per group can do the same one) You cannot use Alert or
JAvaFX Dialogs for any of this. all the data collection and display must
be on javaFX stage windows that you create in code or in FXML
Your group will only be using 3 (or maybe 4 for the one group) (depending
on group size) of these 6 APIs.
- GDP comparison
- use these three api endpoints
- http://api.worldbank.org/v2/countries/USA/indicators/NY.GDP.MKTP.CD?per_page=5000&format=json
- http://api.worldbank.org/v2/countries/CHN/indicators/NY.GDP.MKTP.CD?per_page=5000&format=json
- http://api.worldbank.org/v2/countries/IND/indicators/NY.GDP.MKTP.CD?per_page=5000&format=json
- the old versions are below.
- http://api.worldbank.org/countries/USA/indicators/NY.GDP.MKTP.CD?per_page=5000&format=json
- http://api.worldbank.org/countries/CHN/indicators/NY.GDP.MKTP.CD?per_page=5000&format=json
- http://api.worldbank.org/countries/IND/indicators/NY.GDP.MKTP.CD?per_page=5000&format=json
- Let your user choose a year, display
that year and display the country name and GDP for these three
countries (US, China and India) for that year
- allow the user to select another year
and update the data to that new year.
- The Games of Thrones Book API https://anapioficeandfire.com/Documentation#books
- get the books information by default,
display the name of the book, its ISBN number, the number of pages
and a list of POV characters (show their names).
- when a POV character is selected,
display when the character was born, when the character died and the
actor(s) that played the character.
- Makeup
- use this makeup API
http://makeup-api.herokuapp.com/
- allow your users to set values for
at least three of the search parameters at the bottom of the api
documentation page
- send the API information and put the
result name into a list box, when the user selects the particular
type of makeup from the listbox, display price, description, brand
and at least one other piece of information in your UI
- International Phone Numbers
- use these two API endpoints: http://country.io/phone.json
and http://country.io/names.json
to let your users look up the country codes for a country of their
choice.
- let the user choose a country
- look up its phone code
- display the country name. country code
(the two or three character ISO code) and the phone prefix
- allow the user to do the same again
for another country
- A blast from the past, Chuck Norris
Jokes
- use this API: https://api.chucknorris.io/
- First let your user choose a
category. Pick ten of the categories here:
https://api.chucknorris.io/jokes/categories (if you find a
category that has inappropriate material - omit that one) I have
only looked at about 5 of these so there is a possibility that
there is something that is not appropriate - if so, omit that
category.
- Once the user has picked a category,
make another request for a random joke from that category and
display it to the user.
- the Star Wars API
- use this star wars API:
https://swapi.dev/documentation
- let your user search on a
character
- when the data comes back, follow the
API links in the returned data to get the name of the character's
home planet, and the movies they were in. Also include
the character's name, height, and birth year on display.
Intermediate Deliverable:
In class on Nov 23rd/24th, each group needs to pass in a one page summary
which includes:
- Which of the APIs your group is going to deliver
- which API each person is responsible for
- A short summary of what your group has accomplished so far. (which
might not be much more than looking up how to use the APIs and maybe
Extra requirements for the project
Comment your code.
Include comments at the top of your JavaFX Application class
your name
Anything you didn't get done
Make your commit/pull request messages
informative, as per above, I will be assigning credit for
good/descriptive messages.
Submission:
upload the entire project, including
all of the Maven files needed to run on another machine to one student's
github and make me a collaborator as before.