Open universe3 opened 4 months ago
@universe3 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@dotnet-policy-service agree [company="{your company}"]
Options:
- (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
- (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"
GPA Calculator This repository contains a C# application that calculates the GPA (Grade Point Average) for a student based on their courses, credit hours, and grades.
Features Input Handling: The program initializes the student's course information, credit hours, and grades. Credit Hours Calculation: Sums up the total credit hours for the courses. Grade Points Calculation: Calculates the total grade points earned based on the course credit hours and grades. GPA Calculation: (To be implemented in the next steps) The GPA will be calculated using the total credit hours and total grade points. How It Works Initialization:
The student's name, course names, credit hours, and grades are defined. Two variables, totalCreditHours and totalGradePoints, are initialized to zero. Calculations:
The total credit hours are calculated by summing the credit hours for all courses. The total grade points are calculated by summing the product of each course's credit hours and its grade. Verification:
The program prints the calculated totalCreditHours and totalGradePoints to the console for verification. Each course's name, grade, and credit hours are printed to the console. Example Output The program outputs the total grade points and total credit hours, followed by the details of each course:
css Copy code 57 17 English 101 4 3 Algebra 101 3 3 Biology 101 3 4 Computer Science I 3 4 Psychology 101 4 3 Usage To run the program:
Clone the repository:
sh Copy code git clone https://github.com/your-username/gpa-calculator.git Navigate to the project directory:
sh Copy code cd gpa-calculator Build and run the project using your preferred C# IDE (e.g., Visual Studio, Visual Studio Code):
Open the project in the IDE. Build and run the program. Next Steps Implement the GPA calculation using the totalCreditHours and totalGradePoints. Enhance the program to handle user input for course details. Add error handling and validation for input values. Contributing Feel free to submit pull requests or open issues if you find any bugs or have suggestions for improvements.
License This project is licensed under the MIT License.