An open API service indexing awesome lists of open source software.

https://github.com/mrdevanony/gradeaveragecalculator


https://github.com/mrdevanony/gradeaveragecalculator

Last synced: 3 months ago
JSON representation

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 ๐Ÿงน
```