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, 21.06.2019 21:00
Select all that apply. what types of documents can be created using word-processing software? business newsletters letters of application presentation slideshows customer databases
Answers: 1
question
Computers and Technology, 23.06.2019 06:20
What is a point-in-time measurement of system performance?
Answers: 3
question
Computers and Technology, 23.06.2019 12:00
What does the level 1 topic in a word outline become in powerpoint? a. first-level bullet item b. slide title c. third-level bullet item d. second-level bullet item
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Me ! evelyn is a manager in a retail unit. she wants to prepare a report on the projected profit for the next year. which function can she use? a. pmt b. round c. division d. what-if analysis
Answers: 2
You know the right answer?
Using System; using static System. Console; using System. IO; class DebugFourteen2 { static void Mai...
Questions