I am at wits end. I don't understand what do i need to do to make the code work. I understand main() is static. but what makes my method non-static.
package ch5Hw;
import java.util.Scanner;
public class EventDemo {
int eventId;
int numOfguests;
Event largeWedding= new Event( eventId, numOfguests);
Event smallFamReunion= new Event(eventId, numOfguests);
Event hugeFestival=new Event (eventId, numOfguests);
Scanner keyboard= new Scanner(System.in);
public static void main(String[] args) {
partySize();//ERROR HERE..Cannot make a static reference to the non-static method partySize() from the type EventDemo
}
public void partySize() {
System.out.println("Please enter an identification integer for Wedding");
eventId = keyboard.nextInt();
System.out.println("Please enter the number of guests for your Family Reunion");
numOfguests = keyboard.nextInt();
if (numOfguests < Event.CUTOFF_NUMBER) {
smallFamReunion.setEventNumber(eventId);
smallFamReunion.setNumberOfGuests(numOfguests);
}
else if (numOfguests >= Event.CUTOFF_NUMBER && eventId < 100) {
largeWedding.setEventNumber(eventId);
largeWedding.setNumberOfGuests(numOfguests);
}
else {
hugeFestival.setEventNumber(eventId);
hugeFestival.setNumberOfGuests(numOfguests);
}
}
}