import br.com.jp.ScreenMatch.Behindtscenes.Movie;
public class Main { public static void main(String[] args) { Movie newMovie = new Movie();
newMovie.setName("superman");
newMovie.setLaunchYear(2025);
newMovie.setDuration(129);
//newMovie.reviews = 83;
//newMovie.totalrevies = 378;
newMovie.setIncluded(true);
newMovie.showtecSheet();
newMovie.overall(3);
newMovie.overall(5);
newMovie.overall(3);
System.out.println(newMovie.getTotalReviews());
System.out.println(newMovie.takeAverage());
}
}package br.com.jp.ScreenMatch.Behindtscenes;
public class Movie { private String name; private int LaunchYear; private boolean Included; private float reviews; private int totalReviews; private int Duration;
//variable declarations
public int getTotalReviews(){
return totalReviews;
}
public String getName() {
return name;
}
public int getLaunchYear() {
return LaunchYear;
}
public boolean isIncluded() {
return Included;
}
public float getReviews() {
return reviews;
}
public int getDuration() {
return Duration;
}
//in here is the end of the getters
public void setName(String name) {
this.name = name;
}
public void setLaunchYear(int launchYear) {
LaunchYear = launchYear;
}
public void setIncluded(boolean included) {
Included = included;
}
public void setReviews(float reviews) {
this.reviews = reviews;
}
public void setTotalReviews(int totalReviews) {
this.totalReviews = totalReviews;
}
public void setDuration(int duration) {
Duration = duration;
}
// end of the setters
public void showtecSheet() {
System.out.println(name);
System.out.println(LaunchYear);
System.out.println(Included);
System.out.println(Duration);
}
public void overall(float overallgrade) {
reviews += overallgrade;
totalReviews++;
}
public double takeAverage(){
return reviews / totalReviews;
}
}