https://github.com/mrdevanony/gradeaveragecalculator
https://github.com/mrdevanony/gradeaveragecalculator
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mrdevanony/gradeaveragecalculator
- Owner: MrDevAnony
- License: mit
- Created: 2025-04-12T11:40:10.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-04-12T11:45:26.000Z (9 months ago)
- Last Synced: 2025-06-18T00:39:27.292Z (7 months ago)
- Language: Java
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ GPA Calculator (with a Fun Twist!)
A simple Java console program that calculates a student's GPA based on 10 subjects, and adds a little surprise at the end ๐
If your GPA is higher than 18, youโll get a **random reward**!
If it's 18 or below, well... you might face a **random punishment** ๐
---
## ๐ฆ Features
- Accepts grades for 10 subjects
- Validates each grade (must be between 0 and 20)
- Calculates the GPA
- Randomly gives a **reward** if GPA > 18
- Randomly gives a **punishment** if GPA โค 18
- Simple and interactive console interface
---
## ๐ Requirements
- Java JDK 17 or newer
- A terminal or console (or run it in **VS Code**, IntelliJ, etc.)
---
## ๐ How to Run
### 1. Clone the repository
```bash
git clone https://github.com/your-username/gpa-calculator.git && cd gpa-calculator
```
#### 2. Compile the program
```bash
javac StudentGrades.java
```
### 3. Run the program
```bash
java StudentGrades
```
## ๐งช Sample Output
```text
Enter the grades for 10 subjects (0 to 20):
Grade 1: 19
Grade 2: 17
...
Your GPA is: 18.70
Congrats! You get a reward: Free ice cream ๐ฆ
```
or
```text
Your GPA is: 15.40
Oops! Your punishment is: Clean your room ๐งน
```