Question: this is the main class, it works for first step when i enter 1 or 2 for the next step it gives an error saying " error reading file

public static void main(String[] args) throws IOException{

```
    Scanner sc = new Scanner(System.in);
    System.out.println("1.Fraction Calculator");
    System.out.println("2.Grading Scheme");
    System.out.println("Enter Your Choice:");
    int ip = sc.nextInt();
    String frac1, frac2;
            // creating an object of Fraction class
    Grading grad=new Grading();
    grad.readFile();
    grad.calculateAverage();
    grad.calculateTestAvg();
    // creating an object of Fraction class
    Fraction frac =new Fraction();

    switch(ip){
        case 1: System.out.println("Enter two fractions:");
                //  input of the two fractions
                frac1 = sc.next(); frac2 = sc.next();
                // displaying the result table
                System.out.println("Addition: " + frac.add(frac1, frac2) + "\nSubtraction: " + frac.sub(frac1,frac2) + "\nMultiplication: " + frac.mul(frac1,frac2) + "\nDivision: " + frac.div(frac1, frac2));
                break; 

        case 2: grad.printGrades(); break;

        default : break;
    }
}

```

Answer: 
What you are looking for is **Composite key** which is a key made from two or more columns.
So, your table is defined by:

```
create table eventparticipant(
    event_id int not null,
    participant_id int not null,
    PRIMARY KEY (participant_id, event_id)
);

```
You can't have two primary keys in a table. Also, you don't really want to combine those tables do you? Good design would have separate tables for participants and events. The participant table might have a column with a foreign key to the event, or if a participant can have multiple events, you would create another table to link events and participants. IOW, a many to many relationship.

So, from a design perspective, you need to determine if participants can have more than one event.