Comp 152 Project 5:
Teams, APIs, third party libraries and a bigger project
Due: Sunday May 10th 11:59pm
(Just before our final exam should have been)
Intermediate deliverable Due Date: April
28th in Teams.
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 (there might be one group that is odd
numbered)
- First one of the group members needs to create a shared github project
and invite the other members of your group to be a collaborator
- 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-4 (depending on group size) of these 6
APIs.
- GDP comparison
- use these three api endpoints
- 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.
- 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
- Song Search
- use this song search API https://searchly.asuarez.dev/docs/v1#tag/song
This is the documentation for the API.
- allow your users to select an artist
- retrieve the list of songs and
display them in a list box.
- when the user selects and item in
the list box, use the song Id and this similarity search
https://searchly.asuarez.dev/docs/v1#tag/similarity to find
a list of similar songs and display those songs in a second list.
- The github jobs API
- use this API - be sure to use the json
version https://jobs.github.com/positions.json?page=1 you only need
to get the first page of the jobs data
- then let the user start the data
retrieval process, when you get the data back, put it in a listview,
showing job title, when the user clicks on a job in the list view,
show the job details in the window including
- company
- job location
- apply url
- description
- one more data item for the returned
data.
- Use this API for the cards in Blizzard's
Hearthstone game
- https://api.hearthstonejson.com/v1/45932/enUS/cards.json
- first let the user choose a class
using a menu or radio buttons or some chooser. Then show the cards
from the API in a list.
- let the user choose a card from the list
and show all the information from that card in your window in a
format that looks decent.
- 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.
Intermediate Deliverable:
In MS Teams, on April 28th each group needs to pass in a one page summary
which includes:
- The github project URL for your shared project
- 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.
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 gradle files needed to run (but not the ones highlighted in
yellow) to github and make me a collaborator as before.is
the docu