- Name: Maxamed Yuusuf Maxamed
- ID: C1220167
- Class: CA2213
This project is a basic Java program to manage a classroom, its subjects, and students. The program uses classes and objects, arrays, loops, control flow, mathematical operations, and all primitive data types wherever possible.
The project consists of the following Java classes:
- Subject: Represents a subject with a name and credit hours.
- Student: Represents a student with an ID, name, age, subjects, and marks.
- Fasal: Represents a classroom with a name, array of subjects, and array of students.
- Main: The main class to run the program and demonstrate its functionality.
- Attributes:
- String name
- int creditHours
- Methods:
- determineGrade(int marks): Determines the grade based on marks.
- Attributes:
- int id
- String name
- int age
- Subject[] subjects
- int[] marks
- Methods:
- calculateTotalCreditHours(): Calculates the total credit hours of the student.
- calculateGPA(): Calculates the GPA of the student.
- Attributes:
- String name
- Subject[] subjects
- Student[] students
- Methods:
- displayFasalDetails(): Displays the details of the classroom.
- findStudentById(int id): Finds a student by their ID.
- calculateAverageGPA(): Calculates the average GPA of the classroom.
- Contains the main method to run the program and demonstrate the functionality of the other classes.
- Ensure you have Java Development Kit (JDK) installed.
- Clone this repository.
- Open a terminal in the project directory and navigate to the src directory.
- Compile the Java files using the following command:
javac *.java