Using the knowledge of computational language in JAVA it is possible to write a code that removes your favorite phrase from the movie. It consists of two classes in which one is driver code to test the MovieQuoteInfo class.
<h3>Writing code in JAVA:</h3>
<em>public class MovieQuoteInfo { //definition of MovieQuoteInfo class </em>
<em> //All the instance variables marked as private </em>
<em> private String quote;</em>
<em> private String saidBy;</em>
<em> private String movieName;</em>
<em> private int year;</em>
<em> public MovieQuoteInfo(String quote, String saidBy, String movieName, int year) { //parameterized constructor </em>
<em> super();</em>
<em> this.quote = quote;</em>
<em> this.saidBy = saidBy;</em>
<em> this.movieName = movieName;</em>
<em> this.year = year;</em>
<em> }</em>
<em> //getters and setters </em>
<em> public String getQuote() {</em>
<em> return quote;</em>
<em> }</em>
<em> public void setQuote(String quote) {</em>
<em> this.quote = quote;</em>
<em> }</em>
<em> public String getSaidBy() {</em>
<em> return saidBy;</em>
<em> }</em>
<em> public void setSaidBy(String saidBy) {</em>
<em> this.saidBy = saidBy;</em>
<em> }</em>
<em> public String getMovieName() {</em>
<em> return movieName;</em>
<em> }</em>
<em> public void setMovieName(String movieName) {</em>
<em> this.movieName = movieName;</em>
<em> }</em>
<em> public int getYear() {</em>
<em> return year;</em>
<em> }</em>
<em> public void setYear(int year) {</em>
<em> this.year = year;</em>
<em> }</em>
<em> //overriden toString() to print the formatted data</em>
<em> public String toString() {</em>
<em> String s = quote+",\n";</em>
<em> s+="said by "+this.saidBy+"\n";</em>
<em> s+="in the movie "+this.movieName+"\n";</em>
<em> s+="in "+this.year+".";</em>
<em> return s;</em>
<em> }</em>
<em>}</em>
<em>Driver.java</em>
<em>public class Driver { //driver code to test the MovieQuoteInfo class</em>
<em> public static void main(String[] args) {</em>
<em> MovieQuoteInfo quote1 = new MovieQuoteInfo("Rosebud", "Charles Foster Kane", "Citizen Kane", 1941);//Create an object of MovieQuoteInfo class</em>
<em> System.out.println(quote1); //print its details </em>
<em> }</em>
<em>}</em>
See more about JAVA at brainly.com/question/12975450
#SPJ1