-
Notifications
You must be signed in to change notification settings - Fork 0
/
Movie.java
63 lines (47 loc) · 1.31 KB
/
Movie.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import java.nio.file.attribute.UserPrincipal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Scanner;
public class Movie {
public Movie(){
String title;
String actor;
String genre;
String year;
}
public Movie(String titleIn, String actorIn, String genreIn, String yearIn){
//Movie movie = new Movie();
this.title = titleIn;
this.actor = actorIn;
this.genre = genreIn;
this.year = yearIn;
}
protected String title;
protected String actor;
protected String genre;
protected String year;
static Scanner UserInput = new Scanner(System.in);
static void setTitle(){
System.out.println("Enter movie title:");
this.title = UserInput.next();
}
static void setActor(){
System.out.println("Enter movie actor:");
actor = UserInput.next();
}
static void setGenre(){
System.out.println("Enter movie genre:");
genre = UserInput.next();
}
static void setYear(){
year = UserInput.next();
}
static void setWorkingList(){
}
public String toString(){
return "[" + title + ", " + actor + ", " + genre + ", " + year + "]";
}
public String getTitle(){
return title;
}
}