Skip to content

A simple application in C# designed to present student grades in the command line.

Notifications You must be signed in to change notification settings

Rustic-Citrus/csharp-grades

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student Grades in C#

Author: Harry Stuart Curtis

Published: 2024-02-03

Last Updated: 2024-02-04

Introduction

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.

Getting Started

Prerequisites

Ensure that Microsoft .NET Framework is installed on your computer. You can download it by clicking on this link.

Setup

  1. 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

  2. Next, clone the repository to your current working directory.

    git clone https://github.com/Rustic-Citrus/csharp-grades.git

  3. Navigate into the project directory.

    cd csharp-grades

  4. To run the C# program, you must pass one of two possible arguments.

    1. To run the Gradebook application, type:

      dotnet run -- gradebook

    2. To run the GPA application, type:

      dotnet run -- gpa

Background

This application was a collection of guided projects from Microsoft Learn. You can find more information about the steps that I followed below:

  1. Guided project - Calculate and print student grades
  2. Guided project - Calculate final GPA

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.

About

A simple application in C# designed to present student grades in the command line.

Topics

Resources

Stars

Watchers

Forks

Languages