develop #1
@@ -125,7 +125,7 @@ Understanding: You must be able to explain your implementation
|
||||
|
||||
---
|
||||
## Bonus Tasks ✒️
|
||||
Fetch and display movie information using movie ID
|
||||
1. Fetch and display movie information using movie ID
|
||||
|
||||
In this section, you must implement the ability to search for a movie by its ID. The user enters an ID, and the program displays complete movie details.
|
||||
|
||||
@@ -149,40 +149,41 @@ Implementation Steps:
|
||||
|
||||
1. Build and Send Request (getMovieById method):
|
||||
|
||||
Create HTTP request to: https://api.meshcomp.ir/api/v1/movies/{movieId}
|
||||
Create HTTP request to: https://api.meshcomp.ir/api/v1/movies/{movieId}
|
||||
|
||||
Replace {movieId} with the ID from user
|
||||
Replace {movieId} with the ID from user
|
||||
|
||||
Send request and get response
|
||||
Send request and get response
|
||||
|
||||
2. Handle Response (getMovieById method):
|
||||
|
||||
If status code is 200, return JSON body
|
||||
If status code is 200, return JSON body
|
||||
|
||||
Otherwise, print error and return null
|
||||
Otherwise, print error and return null
|
||||
|
||||
3. Parse JSON and Create Movie Object (displayMovieDetails method):
|
||||
|
||||
Parse JSON response to JsonObject
|
||||
Parse JSON response to JsonObject
|
||||
|
||||
Extract all fields: id, title, year, poster, country, imdb_rating
|
||||
Extract all fields: id, title, year, poster, country, imdb_rating
|
||||
|
||||
Parse "genres" array and convert each to Genre object
|
||||
Parse "genres" array and convert each to Genre object
|
||||
|
||||
Create a Movie object with all extracted data
|
||||
Create a Movie object with all extracted data
|
||||
|
||||
4. Display Results (displayMovieDetails method):
|
||||
|
||||
Print all movie details in a clean format
|
||||
Advanced search (title, genre, year, rating, etc.)
|
||||
Print all movie details in a clean format
|
||||
|
||||
Sorting options for movies
|
||||
2. Advanced search (title, genre, year, rating, etc.)
|
||||
|
||||
Save/load favorite movies to/from a file
|
||||
3. Sorting options for movies
|
||||
|
||||
Improved console menu design
|
||||
4. Save/load favorite movies to/from a file
|
||||
|
||||
GUI version using JavaFX
|
||||
5. Improved console menu design
|
||||
|
||||
6. GUI version using JavaFX
|
||||
|
||||
---
|
||||
## References 📚
|
||||
|
||||
Reference in New Issue
Block a user