E
Extra Account
Guest
Hello,
I was wondering (if possible) how I would display the output as a list. For Example:
Student: Dana Scully
ID: 123654
Major: Engineering
Year: 4
Final Grade: 90
Thanks in advance.
Student_Info Class:
using System;
using System.Collections.Generic;
using System.Text;
namespace Program_3
{
class Student_Info
{
public string Name;
public int ID;
public string Major;
public int Year;
public int Grade;
public Student_Info(string aStudentName, int aStudentID, string aMajor, int aYear, int aOverallGrade)
{
Name = aStudentName;
ID = aStudentID;
Year = aYear;
Major = aMajor;
Grade = aOverallGrade;
}
}
}
Main Program:
using System;
namespace Program_3
{
class Program
{
static void Main(string[] args)
{
Student_Info Student1 = new Student_Info("Dana Scully", 123654, "Engineering", 4, 90);
Console.WriteLine(Student1.Name + " " + Student1.ID + " " + Student1.Major + " " + Student1.Year + " " + Student1.Grade);
Console.ReadLine();
}
}
}
Continue reading...
I was wondering (if possible) how I would display the output as a list. For Example:
Student: Dana Scully
ID: 123654
Major: Engineering
Year: 4
Final Grade: 90
Thanks in advance.
Student_Info Class:
using System;
using System.Collections.Generic;
using System.Text;
namespace Program_3
{
class Student_Info
{
public string Name;
public int ID;
public string Major;
public int Year;
public int Grade;
public Student_Info(string aStudentName, int aStudentID, string aMajor, int aYear, int aOverallGrade)
{
Name = aStudentName;
ID = aStudentID;
Year = aYear;
Major = aMajor;
Grade = aOverallGrade;
}
}
}
Main Program:
using System;
namespace Program_3
{
class Program
{
static void Main(string[] args)
{
Student_Info Student1 = new Student_Info("Dana Scully", 123654, "Engineering", 4, 90);
Console.WriteLine(Student1.Name + " " + Student1.ID + " " + Student1.Major + " " + Student1.Year + " " + Student1.Grade);
Console.ReadLine();
}
}
}
Continue reading...