Hey Everyone and thank you for reading this post.
Okay so I am currently coding this project in BlueJ, here is what I have so far:
I have 5 classes thus far:
-Film : which I have got to create a film object which includes the films (title, director, release year and duration) ... I will want it to be able to get these details from reading a text film rather than manual input at some stage.
-Show: The show takes the film and creates a show, a show consists of the films duration plus the ad duration (currently 20 minutes) and round up to the nearest hour. Showings are either 2, 3, 4 or 5 hours long. My current setup is to store the show time limits in an array in reverse order, i then have a for loop which runs as many times as there are instances in the array. This takes the array value i.e. 120 for 2 hours and minus' the sum of the film and ad duration. If its >= 0 it stores the value of the array item into a variable named showDuration. - is there a cleaner way?
I also have empty classes at the moment: Show Schedule, Screen and Cinema.
-showschedule creates a schedule from the shows
-screen selects a schedule
- cinema displays films on show plus creates screens
!!! I also need to create a class to handle seat bookings
My issues at the moment are this:
It is required that the class Show returns the film information ( title, director, release year and duration - 2 String and 2 int).
I don't know if I should be storing the values of the film object within the show object from when the show object is being created (duplication / efficiency issues here perhaps?)
How do I return 2 different types of values at once without using the to string command.
Orrr do I somehow reference the film object initially used to create the show object and use a method call on the film object to return the values?
so far I have this accessor method ...
public Film getFilmDetails()
{
// to be completed
}
A final issue for now is forward thinking. I want to be able to create a new cinema object which automatically generates the 4 screens which
Please can you help me out, Im not expecting code but some thoughts on the issues I have raised and some learning materials would be hugely beneficial
HBiz