Hello!,
I am editing a code for a project and Im stuck at creating a instance! I need to create an instance that
1. Create three instances of the student class, all with different student ids
2. Set the first name, last name, and middle initial for each of the three student objects
3. Enroll the first two student objects in "CIS 252"
4. Write the full name of each student object and whether those students are enrolled to the console window
5. Add a grade to each of the three students with a total possible points of 100 and earned points of 50, 85, and 98
6. Write the full name of each student object and the course letter grade for each student
I have no idea where to even start in the Program.cs class! Im hoping someone can even point me in the right direction to what to do! Thank You in Advance!
Now this is my code for the Student_.cs class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Test1_Student_Enroll
{
public class Student_
{
public string Studentid
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}
public Student_(string newStuID)
{
Studentid = newStuID;
}
public string FirstName
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}
public string LastName
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}
public string MiddleInitial
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}
public string FullName
{
get
{
return FirstName + MiddleInitial + LastName;
}
}
public string CurrentEnrolledCourse
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}
private int pointsearned { get; set; }
private int pointspossible { get; set; }
public int CurrentCourseAverage
{
get
{
return pointsearned / pointspossible;
}
set
{
if (value >= 0)
CurrentCourseAverage = 100;
}
}
public string CurrentCourseGrade
{
set
{
if (CurrentCourseAverage >= 90)
{
Console.WriteLine("A");
}
else if (CurrentCourseAverage >= 80)
{
Console.WriteLine("B");
}
else if (CurrentCourseAverage >= 70)
{
Console.WriteLine("C");
}
else if (CurrentCourseAverage >= 60)
{
Console.WriteLine("D");
}
else
{
Console.WriteLine("F");
}
}
}
public void Enroll(string CurrentEnrolledCourse)
{
Console.WriteLine("Course: {0}", CurrentEnrolledCourse);
}
public void Drop()
{
CurrentEnrolledCourse = null;
pointspossible = 0;
pointsearned = 0;
}
public void AddGrade(int totalpointspossible, int totalpointsearned)
{
int newGrade = pointsearned + totalpointsearned;
int NewGrade_ = pointspossible = totalpointspossible;
if (CurrentEnrolledCourse != null)
{
return;
}
else { }
}
public bool IsEnrolled()
{
if (CurrentEnrolledCourse != null)
{
return false;
}
else
{
return true;
}
}
}
}
What I have tried:
I haven't been able to figure it out but im stuck here
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Test1_Student_Enroll
{
class Program
{
static void Main(string[] args)
{
Student_ 100 = new Student("Karen","Stacey",
}
}
}