practical quiz 8.movie.java

来自「ssd3的全部答案」· Java 代码 · 共 68 行

JAVA
68
字号
/**
 * This abstract class stores the information of a movie.
 * 
 * @author Neil
 * @version 1.0.0
 */
public abstract class Movie {
	
	private String title;
	private String[] actors;
	private String director;

	/**
	 * Creates a Movie object and initializes the instance variables.
	 * 
	 * @param initialTitle
	 * @param initialActors
	 * @param initialDirector
	 */
	public Movie(String initialTitle, String[] initialActors,
			String initialDirector) {

		title = initialTitle;
		actors = initialActors;
		director = initialDirector;
	}

	/**
	 * Returns the value of the variable title.
	 * 
	 * @return Returns the value of the variable title.
	 */
	public String getTitle() {

		return title;
	}

	/**
	 * Returns a reference to the array actors.
	 * 
	 * @return Returns a reference to the array actors.
	 */
	public String[] getActors() {

		return actors;
	}

	/**
	 * Returns the value of the variable director.
	 * 
	 * @return Returns the value of the variable director.
	 */
	public String getDirector() {

		return director;
	}

	/**
	 * Returns the value of the variable title.
	 * 
	 * return Returns the value of the variable title.
	 */
	public String toString() {

		return title;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?