Program.cs Student 198 199 200 201 282 203 882 Debug X Y Any CPU Analyze Tools Extensions Window Help Search (Ctrl+Q) Start - - 命同,易版|重见习认识, Student Program stud[i].display(); classAvg+= stud[i].average(); Console.WriteLine("Overall class average: "+classAvg/n); Console.WriteLine("Overall class grade:+studal comental Console Writers Program P Student

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Help of what these errors mean. In C# • Create a Class, named Student, to hold properties of Student Last Name, Student First Name, Student ID (9 digits), Course Prefix and Number, and the tests (Test 1, Test 2, Test 3, Test 4). Create appropriate setter and getter accessors, and constructors. Use access modifiers. Example: First Name : Pat Last Name : Smythe Student ID : ABC111333 Course Prefix : CIST Course Name : 2431 Test 1 : 100 Test 2 : 90 Test 3 : 80 Test 4 : 88 • Prompt the user for the Student Last and First Name, Student ID, Course Prefix and Number and the tests. • Include at least one exception handling function. • Use an array to store the 4 test grades. • Use a looping structure to populate the array. • Calculate the numeric average based upon the 4 equally-weighted numeric grades. • Display all the data for each of student using a looping structure. • Display the numeric average for each student. • Create a function that will convert the numeric average to a letter grade average using the grading scale: o A = 90 to100 o B = 80 to 89 o C = 70 to 79 o D = 60 to 69 o F = 0 to 59 • The function must return the value of the letter grade average. • Display the letter grade average for each student. • Calculate the overall class average as a numeric and then a letter grade. • For the last line of the output, display the overall class average as a numeric and then a letter grade. • Write the student data only from the Student Class for each student to a CSV file. Use a looping structure to implement this function. Allow the user to enter the filename. Note that the Course Prefix and Number should not be comma separated. So, CIST, 2431 should be written as (notice the omission of the comma): CIST 2431 Do NOT write the averages to the file. There should be one line written for each student exactly as this example: Smythe, Pat, ABC111333, CIST 2431, 100, 90, 80, 88 Jones, ……… Note that Last Name is written first.
Program.csx
Student
- Debug
198
199
200
201
282
203
204
205
206
287
208
209
210
211
212
213
214
215
216
217
89 %
218
219
-Ⓡ
Project Build
47°F
Partly cloudy
6
Y
Debug Test Analyze Tools Extensions
Any CPU
}
stud[i].display();
classAvg += stud[i].average();
string filename = Console.ReadLine();
using (var stream= File.CreateText(filename))
{
for(int i = 0; i<n; i++)
{
1 reference
private object getID()
ΔΟ ↑
Student.Program
Console.WriteLine("Overall class average: "+classAvg/n);
Console.WriteLine("Overall class grade: " + stud[e]. convert(classAvg/n));
Console.Write("Enter the filename: ");
6 Errors AO Warnings
Error List
Entire Solution.
Code
Description
CS1520 Method must have a return type
CS1520 Method must have a return type
CS0136
A local or parameter named 'csvRow cannot be declared in this scope because
that name is used in an enclosing local scope to define a local or parameter
CS1503 Argument 6: cannot convert from 'void' to 'object'
CS0165 Use of unassigned local variable 'csvRow'
Error List Output
Ready
▶Start-4
#3
4
string csvRow= string.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}\n", stud[i].getLastName(), stud[i].ge
stud[i].getID(), stud[i].getCPrefix
stream.WriteLine(csvRow));
R
24 Messages Build+ IntelliSense
Project
Student
Student
5
Window Help Search (Ctrl+Q)
Student
Student
Student
6
G
B
&
媚风习习习,
hp
H
Program
File
Program.cs
Program.cs
Program.cs
Program.cs
Program.cs
8
9
Ln: 25
Active
Active
209 Active
211 Active
211 Active
K
Ch: 25
Search Error List
Line Suppression State
23
33
SPC
O
Student
I OT
P
CRLF
P-
追
↑ Add to Source Com
Transcribed Image Text:Program.csx Student - Debug 198 199 200 201 282 203 204 205 206 287 208 209 210 211 212 213 214 215 216 217 89 % 218 219 -Ⓡ Project Build 47°F Partly cloudy 6 Y Debug Test Analyze Tools Extensions Any CPU } stud[i].display(); classAvg += stud[i].average(); string filename = Console.ReadLine(); using (var stream= File.CreateText(filename)) { for(int i = 0; i<n; i++) { 1 reference private object getID() ΔΟ ↑ Student.Program Console.WriteLine("Overall class average: "+classAvg/n); Console.WriteLine("Overall class grade: " + stud[e]. convert(classAvg/n)); Console.Write("Enter the filename: "); 6 Errors AO Warnings Error List Entire Solution. Code Description CS1520 Method must have a return type CS1520 Method must have a return type CS0136 A local or parameter named 'csvRow cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter CS1503 Argument 6: cannot convert from 'void' to 'object' CS0165 Use of unassigned local variable 'csvRow' Error List Output Ready ▶Start-4 #3 4 string csvRow= string.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}\n", stud[i].getLastName(), stud[i].ge stud[i].getID(), stud[i].getCPrefix stream.WriteLine(csvRow)); R 24 Messages Build+ IntelliSense Project Student Student 5 Window Help Search (Ctrl+Q) Student Student Student 6 G B & 媚风习习习, hp H Program File Program.cs Program.cs Program.cs Program.cs Program.cs 8 9 Ln: 25 Active Active 209 Active 211 Active 211 Active K Ch: 25 Search Error List Line Suppression State 23 33 SPC O Student I OT P CRLF P- 追 ↑ Add to Source Com
Edit View Git Project Build
gram.cs* X
Student
១ ខ ជ ន ព គ គឺ អ ក គ ន ៖ ឥ ត ឌ ឌី ឌ ៖ ឌ ឌ ទី
19
89%
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Error List
B92 -- Debug
private int cNum;
Error List Output
Ready
47°F
Partly cloudy
8
private int[] tests = new int [4];
// default constructor
O references
Student()
{
}
this. LastName = ""
this.firstName = "";
this.id = "";
4.
Debug Test Analyze Tools Extensions
Any CPU
Start-
this.cPrefix = "";
this.cNum = 0;
O references
Entire Solution.
Code Description
// parametrized constructor
6 ΔΟ
t
this.lastName = lastName;
this.firstName = firstName;
this.id = id;
this.cPrefix= cPrefix;
this.cNum = cNum;
Student.Program
Student (string lastName, string firstName, string id, string cPrefix, int cNum, int[] tests)
-
6 Errors A0 Warnings
#
CS1520 Method must have a return type
CS1520 Method must have a return type
CS0136
A local or parameter named 'csvRow' cannot be declared in this scope because
that name is used in an enclosing local scope to define a local or parameter
CS1503 Argument 6: cannot convert from 'void' to 'object'
CS0165 Use of unassigned local variable 'csvRow
$
R
Y
24 Messages Build+ IntelliSense
Project
Student
Student
Student
Student
Student
%
O
5
Y
Window Help Search (Ctrl+Q)
6
&
旨媚美味风习习习,
hp
-Program
File
Program.cs
Program.cs
Program.cs
Program.cs
Program.cs
4+
8
209
Search Error List
Line Suppression State
23
33
211
211
9
P
Ln: 25 Ch: 25 SPC
Active
Active
Active
Active
Active
O
S
A
Transcribed Image Text:Edit View Git Project Build gram.cs* X Student ១ ខ ជ ន ព គ គឺ អ ក គ ន ៖ ឥ ត ឌ ឌី ឌ ៖ ឌ ឌ ទី 19 89% 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 Error List B92 -- Debug private int cNum; Error List Output Ready 47°F Partly cloudy 8 private int[] tests = new int [4]; // default constructor O references Student() { } this. LastName = "" this.firstName = ""; this.id = ""; 4. Debug Test Analyze Tools Extensions Any CPU Start- this.cPrefix = ""; this.cNum = 0; O references Entire Solution. Code Description // parametrized constructor 6 ΔΟ t this.lastName = lastName; this.firstName = firstName; this.id = id; this.cPrefix= cPrefix; this.cNum = cNum; Student.Program Student (string lastName, string firstName, string id, string cPrefix, int cNum, int[] tests) - 6 Errors A0 Warnings # CS1520 Method must have a return type CS1520 Method must have a return type CS0136 A local or parameter named 'csvRow' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter CS1503 Argument 6: cannot convert from 'void' to 'object' CS0165 Use of unassigned local variable 'csvRow $ R Y 24 Messages Build+ IntelliSense Project Student Student Student Student Student % O 5 Y Window Help Search (Ctrl+Q) 6 & 旨媚美味风习习习, hp -Program File Program.cs Program.cs Program.cs Program.cs Program.cs 4+ 8 209 Search Error List Line Suppression State 23 33 211 211 9 P Ln: 25 Ch: 25 SPC Active Active Active Active Active O S A
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY