Skip to content

marvy-ian/java-grade-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Grade Calculator System

A console-based Java application that processes student academic records, calculates GPA statistics and weighted averages, determines pass or fail results, and generates a formatted grade report.

Features

  • Accepts student name, student ID, and section
  • Supports multiple course entries
  • Records course codes, GPA grades, and units
  • Validates numerical input using exception handling
  • Calculates the average GPA
  • Calculates the unit-weighted average
  • Identifies the highest and lowest GPA
  • Determines pass or fail status for each course
  • Counts passed and failed subjects
  • Assigns overall academic remarks
  • Displays a formatted grade report
  • Allows multiple calculations in one program session

Weighted Average Formula

The weighted average is calculated using:

Weighted Average = Σ(Grade × Units) / Σ(Units)

Courses with more units have a greater effect on the final weighted average.

Grading System

Weighted Average Overall Remarks
1.00 to 1.25 Summa Cum Laude
1.26 to 1.50 Magna Cum Laude
1.51 to 1.75 Cum Laude
1.76 to 3.00 Passed
Above 3.00 Failed

A course grade from 1.00 to 3.00 is considered Passed, while a grade above 3.00 is considered Failed.

Technologies Used

  • Java
  • Java Standard Library
  • Scanner class for user input
  • Arrays for storing course data
  • try-catch for exception handling
  • printf() for formatted console output

Installation

  1. Install the Java Development Kit (JDK).

  2. Verify that Java is installed:

java -version
javac -version
  1. Clone or download this repository.
git clone <repository-url>
  1. Navigate to the project directory.
cd grade-calculator-system
  1. Compile the Java source file.
javac main.java
  1. Run the program.
java main

Usage

  1. Run the application.

  2. Enter the student's name, student ID, and section.

  3. Enter the number of courses.

  4. For each course, provide:

    • Course code
    • GPA grade from 1.0 to 5.0
    • Number of units
  5. The system will calculate and display the complete grade report.

  6. Enter Y to calculate another student's grades or N to exit.

Sample Output

=================================
      GRADE CALCULATOR SYSTEM
=================================
Enter Student Name : Juan Dela Cruz
Enter Student ID   : 2026-001
Enter Section      : BSIT 1A
Enter Number of Courses: 3

Course 1
Enter Course Code : IT101
Enter Grade (1.0 - 5.0): 1.50
Enter Units       : 3

Course 2
Enter Course Code : CS101
Enter Grade (1.0 - 5.0): 1.75
Enter Units       : 3

Course 3
Enter Course Code : MATH101
Enter Grade (1.0 - 5.0): 2.00
Enter Units       : 3

=================================
           GRADE REPORT
=================================
Student Name : Juan Dela Cruz
Student ID   : 2026-001
Section      : BSIT 1A

---------------------------------------------------
Course          GPA        Units      Remarks
---------------------------------------------------
IT101           1.50       3.00       Passed
CS101           1.75       3.00       Passed
MATH101         2.00       3.00       Passed
---------------------------------------------------

Average GPA        : 1.75
Weighted Average   : 1.75
Highest GPA        : 1.5
Lowest GPA         : 2.0
Passed Subjects    : 3
Failed Subjects    : 0
Overall Remarks    : Cum Laude

Do you want to compute again? (Y/N): N

Thank you for using the system.

Project Structure

grade-calculator-system/
│
├── main.java
├── README.md
└── CONTRIBUTING.md

main.java

Contains the complete source code for the Grade Calculator System, including:

  • User input handling
  • Input validation
  • Course data storage
  • GPA calculations
  • Weighted average calculations
  • Pass or fail evaluation
  • Academic remarks
  • Formatted grade report generation

README.md

Contains the project documentation, installation instructions, usage guide, and sample output.

CONTRIBUTING.md

Contains guidelines for contributing to the project, including instructions for reporting issues, suggesting improvements, submitting changes, and following the project's coding standards.

Java Concepts Demonstrated

This project applies several fundamental Java programming concepts:

  • Variables and data types
  • Arrays
  • for and do-while loops
  • if-else statements
  • Exception handling
  • Input validation
  • String manipulation
  • Mathematical operations
  • Formatted console output

Future Improvements

Possible improvements include:

  • Object-oriented implementation using Student and Course classes
  • File-based storage for student records
  • Graphical user interface using JavaFX or Swing
  • Database integration
  • Grade report export
  • Support for customizable grading systems

License

This project is available for educational and personal use.

About

A robust, console-based Java application designed to compute and manage student grades. It calculates both unweighted average GPA and weighted GWA (General Weighted Average) based on course units, tracks academic performance statistics, and automatically determines Latin honors eligibility using the Philippine academic grading scale (1.0 to 5.0).

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages