Netflix-like video recommendation system
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
I want to make my own Netflix in C#, without using sql, only using dynamic memory (omitting video-streaming support). I thought about this class diagram. What do you think?
In my main program I have a list with all the existing movies.
Each user has 3 lists, the movies he saw, the ones I keep and the ones recommended.
I thought about changing this last one, by list of pointers, since it consumes less memory. Worth it?
The recommended ones are obtained through an algorithm based on the movies you saw.
This is my code:
Movie class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Libreria
public class Movie
public string Name, Description;
private int Year_Published, Restriction_Age, Duration;
public float Calification;
public List<String> Category = new List<String>;
public List<String> Starring = new List<String>;
public Movie(string nombre, string descripcion, int calificacion, int año_Lanzamiento, int restriccion_Age, int duracion, List<String> categoria, List<String> elenco)
Name = nombre;
Description = descripcion;
Calification = calificacion; //Calificar solo las vistas
Year_Published = año_Lanzamiento;
Restriction_Age = restriccion_Age;
Duration = duracion;
Category = categoria;
Starring = elenco;
public int Sum_Of_Calification = 0;
public int Times_Calified = 1;
public void Rate_Movie(int calificacion)
Times_Calified++;
Sum_Of_Calification = Sum_Of_Calification + calificacion;
Calification = Sum_Of_Calification / Times_Calified;
public void Show_Information()
Console.WriteLine(Name);
Console.WriteLine(Description);
Console.WriteLine(Calification);
Console.WriteLine(Year_Published);
Console.WriteLine(Restriction_Age);
Console.WriteLine(Duration);
User class:
using System.Collections.Generic;
namespace Libreria
class User
//Datos del usuario
public string Name, Surname, Mail;
public int Age;
public User(string nombre, string apellido, string email, int edad)
Name = nombre;
Surname = apellido;
Mail = email;
Age = edad;
//Declaracion de las listas que contendran las Movies vistas, las no vistas, y las recomendadas
List<Movie> Movies_Save = new List<Movie>();
List<Movie> Movies_View = new List<Movie>();
List<Movie> Movies_Recommend = new List<Movie>();
//Precondicion: La pelicula a marcar como vista se encuentra en recomendadas
public void Marcar_Como_Vista(int Number_Of_Movie)
//Inserta pelicula en Vistas
Movies_View.Add(Movies_Recommend[Number_Of_Movie]);
//Remueve pelicula de Recomendadas
Movies_Recommend.Remove(Movies_Recommend[Number_Of_Movie]);
//Precondicion: La pelicula a guardar se encuentra en recomendadas
public void Guardar_Movie(int Number_Of_Movie)
//Inserta la pelicula en Guardadas
Movies_Save.Add(Movies_Recommend[Number_Of_Movie]);
//Remueve pelicula de Recomendadas
Movies_Recommend.Remove(Movies_Recommend[Number_Of_Movie]);
//Precondicion: La pelicula se encuentra en recomendadas
public void Informacion_Movie(int Number_Of_Movie)
Movies_Recommend[Number_Of_Movie].Show_Information();
public void Calificar_Movie(int Number_Of_Movie, int calificacion)
Movies_Recommend[Number_Of_Movie].Calification = calificacion;
As the user can requalify a movie, I did it with sum_qualifications / times_qualified
Would it be better to do it with data table?
c# beginner object-oriented
add a comment |Â
up vote
2
down vote
favorite
I want to make my own Netflix in C#, without using sql, only using dynamic memory (omitting video-streaming support). I thought about this class diagram. What do you think?
In my main program I have a list with all the existing movies.
Each user has 3 lists, the movies he saw, the ones I keep and the ones recommended.
I thought about changing this last one, by list of pointers, since it consumes less memory. Worth it?
The recommended ones are obtained through an algorithm based on the movies you saw.
This is my code:
Movie class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Libreria
public class Movie
public string Name, Description;
private int Year_Published, Restriction_Age, Duration;
public float Calification;
public List<String> Category = new List<String>;
public List<String> Starring = new List<String>;
public Movie(string nombre, string descripcion, int calificacion, int año_Lanzamiento, int restriccion_Age, int duracion, List<String> categoria, List<String> elenco)
Name = nombre;
Description = descripcion;
Calification = calificacion; //Calificar solo las vistas
Year_Published = año_Lanzamiento;
Restriction_Age = restriccion_Age;
Duration = duracion;
Category = categoria;
Starring = elenco;
public int Sum_Of_Calification = 0;
public int Times_Calified = 1;
public void Rate_Movie(int calificacion)
Times_Calified++;
Sum_Of_Calification = Sum_Of_Calification + calificacion;
Calification = Sum_Of_Calification / Times_Calified;
public void Show_Information()
Console.WriteLine(Name);
Console.WriteLine(Description);
Console.WriteLine(Calification);
Console.WriteLine(Year_Published);
Console.WriteLine(Restriction_Age);
Console.WriteLine(Duration);
User class:
using System.Collections.Generic;
namespace Libreria
class User
//Datos del usuario
public string Name, Surname, Mail;
public int Age;
public User(string nombre, string apellido, string email, int edad)
Name = nombre;
Surname = apellido;
Mail = email;
Age = edad;
//Declaracion de las listas que contendran las Movies vistas, las no vistas, y las recomendadas
List<Movie> Movies_Save = new List<Movie>();
List<Movie> Movies_View = new List<Movie>();
List<Movie> Movies_Recommend = new List<Movie>();
//Precondicion: La pelicula a marcar como vista se encuentra en recomendadas
public void Marcar_Como_Vista(int Number_Of_Movie)
//Inserta pelicula en Vistas
Movies_View.Add(Movies_Recommend[Number_Of_Movie]);
//Remueve pelicula de Recomendadas
Movies_Recommend.Remove(Movies_Recommend[Number_Of_Movie]);
//Precondicion: La pelicula a guardar se encuentra en recomendadas
public void Guardar_Movie(int Number_Of_Movie)
//Inserta la pelicula en Guardadas
Movies_Save.Add(Movies_Recommend[Number_Of_Movie]);
//Remueve pelicula de Recomendadas
Movies_Recommend.Remove(Movies_Recommend[Number_Of_Movie]);
//Precondicion: La pelicula se encuentra en recomendadas
public void Informacion_Movie(int Number_Of_Movie)
Movies_Recommend[Number_Of_Movie].Show_Information();
public void Calificar_Movie(int Number_Of_Movie, int calificacion)
Movies_Recommend[Number_Of_Movie].Calification = calificacion;
As the user can requalify a movie, I did it with sum_qualifications / times_qualified
Would it be better to do it with data table?
c# beginner object-oriented
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I want to make my own Netflix in C#, without using sql, only using dynamic memory (omitting video-streaming support). I thought about this class diagram. What do you think?
In my main program I have a list with all the existing movies.
Each user has 3 lists, the movies he saw, the ones I keep and the ones recommended.
I thought about changing this last one, by list of pointers, since it consumes less memory. Worth it?
The recommended ones are obtained through an algorithm based on the movies you saw.
This is my code:
Movie class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Libreria
public class Movie
public string Name, Description;
private int Year_Published, Restriction_Age, Duration;
public float Calification;
public List<String> Category = new List<String>;
public List<String> Starring = new List<String>;
public Movie(string nombre, string descripcion, int calificacion, int año_Lanzamiento, int restriccion_Age, int duracion, List<String> categoria, List<String> elenco)
Name = nombre;
Description = descripcion;
Calification = calificacion; //Calificar solo las vistas
Year_Published = año_Lanzamiento;
Restriction_Age = restriccion_Age;
Duration = duracion;
Category = categoria;
Starring = elenco;
public int Sum_Of_Calification = 0;
public int Times_Calified = 1;
public void Rate_Movie(int calificacion)
Times_Calified++;
Sum_Of_Calification = Sum_Of_Calification + calificacion;
Calification = Sum_Of_Calification / Times_Calified;
public void Show_Information()
Console.WriteLine(Name);
Console.WriteLine(Description);
Console.WriteLine(Calification);
Console.WriteLine(Year_Published);
Console.WriteLine(Restriction_Age);
Console.WriteLine(Duration);
User class:
using System.Collections.Generic;
namespace Libreria
class User
//Datos del usuario
public string Name, Surname, Mail;
public int Age;
public User(string nombre, string apellido, string email, int edad)
Name = nombre;
Surname = apellido;
Mail = email;
Age = edad;
//Declaracion de las listas que contendran las Movies vistas, las no vistas, y las recomendadas
List<Movie> Movies_Save = new List<Movie>();
List<Movie> Movies_View = new List<Movie>();
List<Movie> Movies_Recommend = new List<Movie>();
//Precondicion: La pelicula a marcar como vista se encuentra en recomendadas
public void Marcar_Como_Vista(int Number_Of_Movie)
//Inserta pelicula en Vistas
Movies_View.Add(Movies_Recommend[Number_Of_Movie]);
//Remueve pelicula de Recomendadas
Movies_Recommend.Remove(Movies_Recommend[Number_Of_Movie]);
//Precondicion: La pelicula a guardar se encuentra en recomendadas
public void Guardar_Movie(int Number_Of_Movie)
//Inserta la pelicula en Guardadas
Movies_Save.Add(Movies_Recommend[Number_Of_Movie]);
//Remueve pelicula de Recomendadas
Movies_Recommend.Remove(Movies_Recommend[Number_Of_Movie]);
//Precondicion: La pelicula se encuentra en recomendadas
public void Informacion_Movie(int Number_Of_Movie)
Movies_Recommend[Number_Of_Movie].Show_Information();
public void Calificar_Movie(int Number_Of_Movie, int calificacion)
Movies_Recommend[Number_Of_Movie].Calification = calificacion;
As the user can requalify a movie, I did it with sum_qualifications / times_qualified
Would it be better to do it with data table?
c# beginner object-oriented
I want to make my own Netflix in C#, without using sql, only using dynamic memory (omitting video-streaming support). I thought about this class diagram. What do you think?
In my main program I have a list with all the existing movies.
Each user has 3 lists, the movies he saw, the ones I keep and the ones recommended.
I thought about changing this last one, by list of pointers, since it consumes less memory. Worth it?
The recommended ones are obtained through an algorithm based on the movies you saw.
This is my code:
Movie class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Libreria
public class Movie
public string Name, Description;
private int Year_Published, Restriction_Age, Duration;
public float Calification;
public List<String> Category = new List<String>;
public List<String> Starring = new List<String>;
public Movie(string nombre, string descripcion, int calificacion, int año_Lanzamiento, int restriccion_Age, int duracion, List<String> categoria, List<String> elenco)
Name = nombre;
Description = descripcion;
Calification = calificacion; //Calificar solo las vistas
Year_Published = año_Lanzamiento;
Restriction_Age = restriccion_Age;
Duration = duracion;
Category = categoria;
Starring = elenco;
public int Sum_Of_Calification = 0;
public int Times_Calified = 1;
public void Rate_Movie(int calificacion)
Times_Calified++;
Sum_Of_Calification = Sum_Of_Calification + calificacion;
Calification = Sum_Of_Calification / Times_Calified;
public void Show_Information()
Console.WriteLine(Name);
Console.WriteLine(Description);
Console.WriteLine(Calification);
Console.WriteLine(Year_Published);
Console.WriteLine(Restriction_Age);
Console.WriteLine(Duration);
User class:
using System.Collections.Generic;
namespace Libreria
class User
//Datos del usuario
public string Name, Surname, Mail;
public int Age;
public User(string nombre, string apellido, string email, int edad)
Name = nombre;
Surname = apellido;
Mail = email;
Age = edad;
//Declaracion de las listas que contendran las Movies vistas, las no vistas, y las recomendadas
List<Movie> Movies_Save = new List<Movie>();
List<Movie> Movies_View = new List<Movie>();
List<Movie> Movies_Recommend = new List<Movie>();
//Precondicion: La pelicula a marcar como vista se encuentra en recomendadas
public void Marcar_Como_Vista(int Number_Of_Movie)
//Inserta pelicula en Vistas
Movies_View.Add(Movies_Recommend[Number_Of_Movie]);
//Remueve pelicula de Recomendadas
Movies_Recommend.Remove(Movies_Recommend[Number_Of_Movie]);
//Precondicion: La pelicula a guardar se encuentra en recomendadas
public void Guardar_Movie(int Number_Of_Movie)
//Inserta la pelicula en Guardadas
Movies_Save.Add(Movies_Recommend[Number_Of_Movie]);
//Remueve pelicula de Recomendadas
Movies_Recommend.Remove(Movies_Recommend[Number_Of_Movie]);
//Precondicion: La pelicula se encuentra en recomendadas
public void Informacion_Movie(int Number_Of_Movie)
Movies_Recommend[Number_Of_Movie].Show_Information();
public void Calificar_Movie(int Number_Of_Movie, int calificacion)
Movies_Recommend[Number_Of_Movie].Calification = calificacion;
As the user can requalify a movie, I did it with sum_qualifications / times_qualified
Would it be better to do it with data table?
c# beginner object-oriented
edited Jul 22 at 18:16
t3chb0t
31.8k54095
31.8k54095
asked Jul 22 at 5:56
Damian Sire
111
111
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f200022%2fnetflix-like-video-recommendation-system%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password