subject

Using System; using static System. Console; using System. IO; class DebugFourteen2 { static void Main() { const int END = 999; const string DELIM = ","; const string FILENAME = "StudentData. txt"; Student stu = new Student(); FileStream outFile = FileStream(FILENAME, FileMode. Create, FileAccess. Write); StreamWriter writer = new StreamWriter(outFile); Write("Enter student number or " + END + " to quit "); stu. StuNum = Convert. ToInt32(ReadLine()); while(stu. StuNum == END) { Write("Enter last name "); stu. Name = ReadLine(); Write("Enter grade point average ") stu. Gpa = Convert. ToDouble(ReadLine()); writer. WriteLine(stu. StuNum + DELIM + stu. Name + DELIM + stu. Gpa); Write("Enter next student number or " + END + " to quit "); stu. StuNum = Convert. ToInt(ReadLine()); } writer. Close(); outFile. Close(); } } public class Student { private doubel gpa; private const double MINGPA = 0.0; private const double MAXGPA = 4.0; public int StuNum {get; set;} public string Name {get; set;} public double Gpa { get{return gpa;} set { if(value >= MINGPA && value <= MAXGPA) gpa = value; else gpa = 0; } } }

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Aconstruction company is creating a powerpoint presentation describing how they calculate costs during each construction step. they plan to email this presentation to clients. the individual clients will be watching the presentation slide show on their own personal computers. what is the most important formatting step the company should take to make the text readable and pleasing to the eye?
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
Type the correct answer in the box. spell all words correctly. the managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Q13 what function does a security certificate perform? a. creates user accounts b. scrambles data c. identifies users d. creates password policies e. provides file access
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
You know the right answer?
Using System; using static System. Console; using System. IO; class DebugFourteen2 { static void Mai...
Questions
question
Mathematics, 20.12.2019 17:31
question
Mathematics, 20.12.2019 17:31
Questions on the website: 13722360