Bug 270 - I found that the result of each recommended movie is incorrect. The company list of each movie has the same value. Different movie produced by different companies. I think the array list to store company object is using wrongly.
Summary: I found that the result of each recommended movie is incorrect. The company l...
Status: RESOLVED FIXED
Alias: None
Product: Movie Recommendation System
Classification: Unclassified
Component: Movie Recommendation System (show other bugs)
Version: unspecified
Hardware: PC Windows
: High major
Assignee: David Leung
URL:
Depends on:
Blocks:
 
Reported: 2018-11-29 23:46 HKT by Fung Lam
Modified: 2018-11-29 23:55 HKT (History)
0 users

See Also:


Attachments
screenshot of output (325.23 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-29 23:46 HKT, Fung Lam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fung Lam 2018-11-29 23:46:15 HKT
Created attachment 23 [details]
screenshot of output

Steps to reproduce:
Run the programme.
Input the valid answer.
For example: 
Search "avatar", Prefer Genre “1”, Prefer Country “1”, Prefer Language “1”, Prefer years “1998-2018”, Prefer runtimes “80-200”.
Compare the expected result and the actual result.


Expected result:
best 1 movie

Production Companies:
[id: 289 name: Ingenious_Film_Partners, id: 306 name: Twentieth_Century_Fox_Film_Corporation, id: 444 name: Dune_Entertainment]...

best 2 movie
Production Companies:
[id: 264 name: Studio_Babelsberg, id: 420 name: Marvel_Studios, id: 3036 name: Walt_Disney_Studios_Motion_Pictures, id: 84424 name: Vita-Ray_Dutch_Productions_(III)]...

best 3 movie
Production Companies:
[id: 2 name: Walt_Disney_Pictures, id: 130 name: Jerry_Bruckheimer_Films, id: 20478 name: Moving_Picture_Company_(MPC)]

Actual result:
best 1 movie
Production Companies:
[id: 289 name: Ingenious_Film_Partners, id: 306 name: Twentieth_Century_Fox_Film_Corporation, id: 444 name: Dune_Entertainment]...

best 2 movie
Production Companies:
[id: 289 name: Ingenious_Film_Partners, id: 306 name: Twentieth_Century_Fox_Film_Corporation, id: 444 name: Dune_Entertainment]...

best 3 movie
Production Companies:
[id: 289 name: Ingenious_Film_Partners, id: 306 name: Twentieth_Century_Fox_Film_Corporation, id: 444 name: Dune_Entertainment]...
Comment 1 Fung Lam 2018-11-29 23:55:08 HKT
I found that the JsonToCompany class uses the same array list to store company objects for all movie, hence they have the same value. Now I have changed the code and create different array list store the related company information to each movie. The output is correct now.