Hey guys! I have this program I'm working on, but I keep getting an error in my main class. Here's what I have:
import java.util.Scanner;
public class TicketingSystem {
public static void main(String[] args) {
Game game = new Game();
Scanner input = new Scanner (System.in);
String teamName;
game.addTeam(new Team(teamName));
}
}
public class Team {
private Game teamName;
public Team (Game teamName){
this.teamName = teamName;
}
}
public class Seat {
private String seatType, seatLocation;
private double ticketPrice;
private boolean reserved = false;
public Seat(String seatType, double ticketPrice, String seatLocation) {
this.seatType = seatType;
this.seatLocation = seatLocation;
this.ticketPrice = ticketPrice;
}
public boolean isReserved() {
return reserved;
}
public void setReserved(boolean reserved) {
this.reserved = reserved;
}
public String getSeatLocation() {
return seatLocation;
}
public void setSeatLocation(String seatLocation) {
this.seatLocation = seatLocation;
}
public String getSeatType() {
return seatType;
}
public void setSeatType(String seatType) {
this.seatType = seatType;
}
public double getTicketPrice() {
return ticketPrice;
}
public void setTicketPrice(double ticketPrice) {
this.ticketPrice = ticketPrice;
}
}
public class Game {
ArrayList <Seat> seats = new ArrayList<>();
ArrayList <Team> teams = new ArrayList<>();
ArrayList <Ticket> tickets = new ArrayList<>();
public void addTeam (Team team){
teams.add(team);
}
}
Thanks guys!