Author: Harry Stuart Curtis
Published: 2024-02-03
Last Updated: 2024-02-04
A simple application in C# designed to present student grades in the command line.
The first application, the Gradebook, shows the grades of four students in table format. The test scores of the students are inserted as arrays of integers. Next, the average test score is calculated and assigned to a letter grade, based on a pre-determined grading system. Finally, the table is written to the console in the correct format.
The second application, GPA, calculates the GPA of a student based on an array of course names and letter grades. The grades are compared to a preset list of courses and their credit hours, which allows for the calculation of a grade-point average. The courses are then written to the console, along with the final GPA.
Ensure that Microsoft .NET Framework is installed on your computer. You can download it by clicking on this link.
-
Open a command-line interface and navigate to the directory where you want the project to stored. In Bash, this can be done with the command
cd
:cd path\to\directory
-
Next, clone the repository to your current working directory.
git clone https://github.com/Rustic-Citrus/csharp-grades.git
-
Navigate into the project directory.
cd csharp-grades
-
To run the C# program, you must pass one of two possible arguments.
-
To run the Gradebook application, type:
dotnet run -- gradebook
-
To run the GPA application, type:
dotnet run -- gpa
-
This application was a collection of guided projects from Microsoft Learn. You can find more information about the steps that I followed below:
You will notice that I have applied some concepts, such as arrays, that are not covered in the basic course. I decided to create a more elegant solution than the one suggested. I already had some background knowledge in Python and JavaScript, and I wanted to test my understanding further.