-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMovie.java
More file actions
53 lines (34 loc) · 1.08 KB
/
Copy pathMovie.java
File metadata and controls
53 lines (34 loc) · 1.08 KB
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
// COP3330 Object Oriented Programming
// Andrew Van Siclen
// Spring 2022
import java.util.Arrays;
public class Movie {
private String title;
private double boxoffice;
public Movie() {
System.out.println("Movie object created");
}
public Movie(String title, double boxoffice){
this.title = title;
this.boxoffice = boxoffice;
}
public void Who()
{
System.out.println("Who");
}
public String getTitle(){
return title;
}
public Double getboxoffice(){
return boxoffice;
}
public static void main(String [] args){
Movie obj2 = new Movie("Thor", 1000000.01);
System.out.printf("%s, %.2f%n", obj2.getTitle(), obj2.getboxoffice());
System.out.println ("OMG !" + 1 * 6 + "Dr. Steinberg Rocks !" + 8 / 2) ;
int arr [] = new int [5];
System.out.println(Arrays.toString(arr));
Arrays.fill(arr, 2, 2, 2);
System.out.println(Arrays.toString(arr));
}
}