Make an Application called “ Student Management System ” that connect with database called university , the database contain 3 Tables

26 0

Get full Expert solution in seconds

$1.97 ONLY

Unlock Answer
  • Student Table \ this Table contain all Data About Student in University {
  1. Id — int , primarykey
  2. Name — String
  3. Gpa — Double
  4. College — IT
  5. Age — int

}

  • Course Table \ this Table contain all Data About Courses in University {

1. CourseId —- String

2. CourseName —- String

3. TeacherName —- String

4. college —- String

5. number Of Student —- int

}

  • Student-Course Table \ this table contain a foreign key for both table “ Student and Course ” and contain data about the student who takes some courses or a courses that have number of Student {

studentID — int , foreign key from Student Table

courseID — int , foreign key from Course Table

}

  • The Program should connect to the database and do the following operation :
    • Add Student
    • Delete Student
    • Update Student
    • View All Students in Table View
    • Register Student To Course \ this operation should add a new row in the Student-Course Table that means a specified student has participate in a specified course
    • Show Course Students \ this Operation should show all Student who has participated in specified Course in Table View

Note : Use Scene Builder to Create the Design the Application , and Use Stylesheets to give the application a good Feeling

EXPERT ANSWER

import java.util.*;

public class CompatibleArrays{
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        System.out.println("Enter the size for First array:");
        int size1 = sc.nextInt();
        if(size1 > 0)
        {
            int[] arr1 = new int[size1];
            System.out.println("Enter the elements for First array:");
            for(int i = 0;i < size1; i++)
                arr1[i]=sc.nextInt();
            System.out.println("Enter the size for Second array:");
            int size2=sc.nextInt();
            if(size2 > 0){
                int count = 0;
                int[] arr2 = new int[size2];
                System.out.println("Enter the elements for Second array:");
                for(int i = 0;i < size2; i++)
                    arr2[i] = sc.nextInt();
                if(size1 == size2){
                    for(int i = 0; i < size1; i++){
                        if(arr1[i] < arr2[i])
                            count++;
                    }
                    if(count == 0)
                        System.out.println("Arrays are Compatible");
                    else
                        System.out.println("Arrays are Not Compatible");
                }
                else
                    System.out.println("Arrays are Not Compatible");
            }
            else
                System.out.println("Invalid array size");
        }
        else
            System.out.println("Invalid array size");
    }
}