Computers and Technology

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; } } }

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:40, genyjoannerubiera
Kali, a python programmer, is using the turtle module to write the word β€œhello.” which code should she use to indicate the location to begin writing the word? a # pick up the turtle and move it to its starting location. b penup(-100, 200) goto() pendown() c penup() goto(-100, 200) pendown() d # pick up the turtle and move it to (-100, 200)
Answers: 2
image
Computers and Technology, 23.06.2019 06:30, darlene93
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
image
Computers and Technology, 23.06.2019 13:50, mrfishyyyy
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, summerjoiner
Verify each identity[tex] \frac{csc}{cot \: x \: + \: tan \: x} = cos \: x[/tex]
Answers: 1
Do you know the correct answer?
Using System; using static System. Console; using System. IO; class DebugFourteen2 { static void Mai...

Questions in other subjects:

Konu
History, 10.10.2019 02:30