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 15:30
Which function in spreadsheet software can be used to predict future sales or inventory needs?
Answers: 2
question
Computers and Technology, 22.06.2019 14:20
Consider a byte-addressable computer with 16mb of main memory, a cache capable of storing a total of 64kb of data and block size of 32 bytes. (a) how many bits in the memory address? (b) how many blocks are in the cache? (c) specify the format of the memory address, including names and sizes, when the cache is: 1. direct-mapped 2. 4-way set associative 3. fully associative
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
Ou listened to a song on your computer. did you use hardware or software?
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
You know the right answer?
Using System; using static System. Console; using System. IO; class DebugFourteen2 { static void Mai...
Questions
question
Mathematics, 23.08.2019 18:30
question
Chemistry, 23.08.2019 18:30
question
Social Studies, 23.08.2019 18:30
Questions on the website: 13722363