This project aims to calculate the CR of students in a university. The program reads a CSV file containing the grades of students and, according to the university's criteria, calculates the CR of all students and by courses. At the end of the process, the program displays the CR of all students and the average CR of each course.
- The student's grade ranges from zero to 100;
- A grade is associated with a course code and a discipline;
- The CR is the weighted average of the student's grade in that class with the credit course. The calculation is:
CR = Grade(i) * CreditHours(i) / TotalCreditHours
Where i is the i-th class of a student.
- Clone the repository:
git clone https://github.com/mathunes/sispro-challenge.git
- Go to the project directory:
cd sispro-challenge
- Install any necessary dependencies or libraries with
bundle install
- Run the program:
ruby main.rb <csv_path>
- View the output displayed on the screen, which will show the CR of all students and the average CR of each course.
If you wish to contribute to this project, please follow the guidelines below:
- Fork the repository
- Create a new branch:
git checkout -b <my-new-branch>
- Make changes and run the test:
rspec
- Add the changes:
git add .
- Commit your changes:
git commit -m "Add some feature"
- Push to the branch:
git push origin <my-new-branch>
- Submit a pull request to the original repository
This project is licensed under the MIT License.