Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program in csharp that takes data from one master file that has three li

ID: 3528615 • Letter: W

Question

Write a program in csharp that takes data from one master file that has three lines. The first line is a comma separated list of category names like: Exam, Lab, Homework, Project, Class Participation There may be extra spaces after the commas. Categories will be chosen so that each one starts with a different letter. The second line contains the integer weights for each category, like: 40, 15, 15, 20, 10 They do not need to add to 100. If the sum is called totWeights, get the final grade by summing for each category: (category weight)(category grade)/totWeights The third line will contain the number of grades in each category, like 2, 5, 3, 1, 2 The second master file contain a list of student information records. Each record (one per input line) will have the following structure: Student ID, Last Name, First Name. There will be a secondary file for each student, named after the student id and the course abbreviation and

Explanation / Answer

StreamReader sr = new StreamReader(FilePath); importingData = new Account(); string line; string[] row = new string [5]; while ((line = sr.ReadLine()) != null) { row = line.Split(','); importingData.Add(new Transaction { Date = DateTime.Parse(row[0]), Reference = row[1], Description = row[2], Amount = decimal.Parse(row[3]), Category = (Category)Enum.Parse(typeof(Category), row[4]) }); }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote