1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
bija089 [108]
2 years ago
10

Write, compile, and test the MovieQuoteInfo class so that it displays your favorite movie quote, the movie it comes from, the ch

aracter who said it, and the year of the movie: I GOT IT DONT WATCH AD.
class MovieQuoteInfo {
public static void main(String[] args) {
System.out.println("Rosebud,");
System.out.println("said by Charles Foster Kane");
System.out.println("in the movie Citizen Kane");
System.out.println("in 1941.");
}
}
Computers and Technology
1 answer:
Irina18 [472]2 years ago
7 0

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

You might be interested in
Your mom wants to start using some type of cloud storage so that she can access
Whitepunk [10]
A cloud storage she can use for her business files without having to remote into another machine is Dropbox
4 0
4 years ago
Who when and why developed python​
Valentin [98]

Explanation:

Python was conceived in the late 1980s by Guido van Rossum at Centrum Wiskunde & Informatica (CWI) in the Netherlands as a successor to the ABC language (itself inspired by SETL), capable of exception handling and interfacing with the Amoeba operating system. Its implementation began in December 1989.

4 0
3 years ago
Read 2 more answers
Marcus creates a HTML webpage on his favourite game, football. On clicking the word “football” another website containing the in
shtirl [24]
I can’t see the following tags that he could’ve possibly used
3 0
3 years ago
Which was the first arcade game that was adapted for mobile phones ????
natka813 [3]

The correct answer is Snake.

4 0
3 years ago
Consider the following code example:
vampirchik [111]

Answer:

This exercise includes the following question and options:

What is the logical error in the coded query?

A) <em>The condition in the WHERE clause should be coded in the HAVING clause.</em>

B) <em>The column name for the fifth column in the result set doesn't match the data.</em>

C) <em>The three columns in the ORDER BY clause should use the DESC keyword so the city totals will be in the right sequence.</em>

D) <em>The condition in the HAVING clause should be coded in the WHERE clause.</em>

And from the options provided, the error is in the 5th column, due to the column name in that result series/group doesn't really coincide with the data, thereby the correct option is <em>B)</em>.

3 0
3 years ago
Other questions:
  • Most information security incidents will occur because of _________. Select one: a. Users who do not follow secure computing pra
    10·1 answer
  • Find an element inside a div using javascript
    12·1 answer
  • You are troubleshooting an IEEE 802.11 wireless client device that cannot connect to the wireless network. You notice the client
    14·1 answer
  • 3. Find the product of (a² +3a+5) x (a+7)​
    7·1 answer
  • What is a form of a stationary mouse on which the movement of a finger causes the pointer on the screen to move?
    7·1 answer
  • Which can be used to decode a Unicode character encoding into text?
    13·1 answer
  • What was your favorite animals, game, photo, friends,
    7·2 answers
  • Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. T
    6·1 answer
  • I have no idea what I’m doing and this is due in 45 minutes
    7·1 answer
  • What allows a programmer to write code quickly and efficiently for an action that must be repeated?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!