Question: Draw flowgraph for the given code below: import java.util.ArrayList; import java.util.List; import java.util.Scanner; class Movie { private String title; private String genre; private int duration;
Draw flowgraph for the given code below: import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
class Movie
private String title;
private String genre;
private int duration;
public MovieString title, String genre, int duration
this.title title;
this.genre genre;
this.duration duration;
public String getTitle
return title;
public String getGenre
return genre;
public int getDuration
return duration;
class Showtime
private Movie movie;
private String time;
public ShowtimeMovie movie, String time
this.movie movie;
this.time time;
public Movie getMovie
return movie;
public String getTime
return time;
class Seat
private int seatNumber;
private boolean isAvailable;
public Seatint seatNumber
this.seatNumber seatNumber;
this.isAvailable true;
public int getSeatNumber
return seatNumber;
public boolean isAvailable
return isAvailable;
public void setAvailableboolean available
isAvailable available;
class Theater
private int theaterNumber;
private List showtimes;
private List seats;
public Theaterint theaterNumber
this.theaterNumber theaterNumber;
this.showtimes new ArrayList;
this.seats new ArrayList;
initializeSeats;
private void initializeSeats
for int i ; i ; i
seats.addnew Seati;
public int getTheaterNumber
return theaterNumber;
public List getShowtimes
return showtimes;
public List getSeats
return seats;
class Cinema
private List theaters;
public Cinema
theaters new ArrayList;
initializeTheaters;
private void initializeTheaters
for int i ; i ; i
theaters.addnew Theateri;
public List getTheaters
return theaters;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
