-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.java
More file actions
31 lines (27 loc) · 1007 Bytes
/
Program.java
File metadata and controls
31 lines (27 loc) · 1007 Bytes
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
import java.lang.*;
import java.util.*;
/**
* Note that Java console applications need to be run through the java runtime
* by running "java -jar JarFile.jar" in the command line.
* Java console applications can not be previewed in the Compilr IDE, only applets can.
*/
public class Program
{
/**
* This is the main entry point for the application
*/
public static void main(String args[])
{
String customerRentalRecord;
System.out.println("Welcome to the Movie Store");
Movie movie1 = new Movie("movie1", 1);
Movie movie2 = new Movie("movie2", 2);
Rental rental1 = new Rental(movie1, 10);
Rental rental2 = new Rental(movie2, 5);
Customer customer1 = new Customer("joe");
customer1.addRental(rental1); customer1.addRental(rental2);
System.out.println("Let's get the Statement");
customerRentalRecord = customer1.statement();
System.out.println(customerRentalRecord);
}
}