1II /// Project 1 - Build a C# console app using object oriented /// which will
ID: 3888831 • Letter: 1
Question
1II /// Project 1 - Build a C# console app using object oriented /// which will report on students and their grades. /// In the Projl FileData.csv. text file, there is data for programming Student name List of 14 grade items for each student including Name of grade item Maximum possible points for grade item Student's grade on grade items //1 Read and parse the .csv data file (perhaps using String.Split()), /// and populate a List or array of Students. /// For each student, populate a list of grade items //1 (including grade item name, possible points and actual points) /// Display list of students and their grade items with point:s /// and the course average for the student. /// The format of the .csv data file is: Student name : Grade item name, max points, awarded points; Grade item name, max points, awarded points;;;; /// (One suggested way to parse this data is to use the String.split() /// iteratively on the chars :;,) /I/ Define a Student class to hold function name List of GradeItems /// with methods AddGrade () AverageGrade () ToString() /I/ Define a GradeItem class to hold GradeItem name max points points (awarded) /// with Methods ToString() /11Explanation / Answer
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Marksheet1
{
class Program
{
static void Main(string[] args)
{
int r, m1, m2, m3, t;
float p;
string n;
Console.WriteLine("Enter Roll Number :");
r = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter Student Name :");
n = Console.ReadLine();
Console.WriteLine("Mark of Subject1 : ");
m1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Mark of Subject2 : ");
m2 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Mark of Subject3 : ");
m3 = Convert.ToInt32(Console.ReadLine());
t = m1 + m2 + m3;
p = t / 3.0f;
Console.WriteLine("Total : " + t);
Console.WriteLine("Percentage : " + p);
if (p >= 35 && p < 50)
{
Console.WriteLine("Grade is C");
}
if (p >= 50 && p <= 60)
{
Console.WriteLine("Grade is B");
}
if (p > 60 && p <= 80)
{
Console.WriteLine("Grade is A");
}
if (p > 80 && p <= 100)
{
Console.WriteLine("Grade is A+");
}
Console.ReadLine();
}
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.