forked from cuongquangnam/CZ2002-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreateMovieView.java
40 lines (28 loc) · 1.2 KB
/
CreateMovieView.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
package com.views;
import java.util.ArrayList;
import com.controllers.IOController;
import com.controllers.MovieListingController;
public class CreateMovieView extends View {
@Override
public void start() {
String movieTitle = IOController.readString("Please enter title of the movie: ");
System.out.println("Please enter the showing status of the movie: ");
System.out.println("1. Coming Soon");
System.out.println("2. Now Showing");
System.out.println("3. Not Showing");
int showingStatus = IOController.readChoice (1,3);
String sypnosis = IOController.readString("Please enter sysnosis of the movie: ");
String director = IOController.readString("Please enter director of the movie: ");
ArrayList <String> cast = new ArrayList();
String Cast ="";
System.out.println("Enter the cast of the movie (atleast 2) folowed by a '0' when done");
while (!Cast.equals("0"))
{
Cast = IOController.readString("");
cast.add(Cast);
}
double basePrice = IOController.readDouble("Please enter the base price of the movie");
MovieListingController.createMovie(movieTitle, showingStatus, sypnosis, director, cast, basePrice);
intent(this, new StaffHomePageView());
}
}