Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Output shoud be like: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SMS { class Student { } } using System; using

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Output shoud be like:

image text in transcribed

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;

namespace SMS { class Student { } }

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using static System.Console;

namespace SMS { class StudentRoster { private Student[] roster; private int studentCount;

public StudentRoster() {

roster = new Student[10]; studentCount = 0;

}

public void AddStudent(Student student) {

// Take the provided student and add it to the array // at the location specified by the counter. // Increment the counter after doing so

roster[studentCount++] = student;

}

public void PrintStudentList() {

WriteLine("The following are students in the Roster");

for (int i = 0; i

// Uncomment this line when you have finished writing the Student Class // WriteLine("{0} {1}", roster[i].FirstName, roster[i].LastName);

// ADD code to process theses and dissertation titles

WriteLine();

} // end for

} } }

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using static System.Console;

namespace SMS { class StudentSystem {

static void Main(string[] args) { // Create an instance of StudentSystem and call the processStudents method. StudentSystem myStudentSystem = new StudentSystem(); myStudentSystem.StartProgram();

}

private void StartProgram() {

// stores what the user wants to do string userInput = "";

// temporary variables for student instances string firstName; string lastName;

WriteLine("\t\tStudentManagementSystem"); WriteLine("Press X to exit.");

do {

Write("Do you want a (S)tudent, (G)radStudent or (P)hD Student? ");

// store user input in uppercase. userInput = ReadLine(); userInput = userInput.ToUpper();

// We need this to avoid one extra prompt after user selects X // X is a sentinel. X indicates that input is finished. if (userInput == "X") break;

Write("Enter first name: "); firstName = ReadLine(); Write("Enter last name: "); lastName = ReadLine();

// Add Switch Statement HERE

// Keep on looping while input is not X } while (userInput != "X");

// INSERT CALL to PrintStudentList method of theRoster

} } }

Please use the giving template to finish the code. I will give you good rating and comments if you finish the code. Thank you so much

Instructions Download the template zip file with the IC and use the project enclosed within to work. Add your name, class, and class time to Line 1 of each .es file. 1. Develop Class Student. 1.1. Within the Student class, add fields for first name and last name. 1.2. Add Properties for each of the fields. Make the fields "protected" so that derived classes can access the fields. 1.3. Create a parameterless constructor and an overloaded one with name as a parameter. 1.4. All objects inherit a method called ToString0, which returns a string representation of the object. For a Student, that might equate to printing the name of a student. To customize the method for the Student class, do the following 1.4.1. Create a method called ToString0, which returns a string. Prefix it with the keyword "override" to indicate that you are overriding the inherited method. 1.4.2. Within the body of the method, write one line of code to return a string which combines both the first name and last name. 2. Add Class GraduateStudent 2.1. Create a Class GraduateStudent that is derived from or inherits from the Student class. 2.2. Graduate students have a Master's thesis. Create fields for the thesis. Choose appropriate names and data types. 2.3. Create Property for the thesis. 2.4. Create a parameterless constructor. 2.5. Create an overloaded constructor with firstName as a parameter. Within the declaration, call the overloaded Student (base) constructor and pass it the firstName Instructions Download the template zip file with the IC and use the project enclosed within to work. Add your name, class, and class time to Line 1 of each .es file. 1. Develop Class Student. 1.1. Within the Student class, add fields for first name and last name. 1.2. Add Properties for each of the fields. Make the fields "protected" so that derived classes can access the fields. 1.3. Create a parameterless constructor and an overloaded one with name as a parameter. 1.4. All objects inherit a method called ToString0, which returns a string representation of the object. For a Student, that might equate to printing the name of a student. To customize the method for the Student class, do the following 1.4.1. Create a method called ToString0, which returns a string. Prefix it with the keyword "override" to indicate that you are overriding the inherited method. 1.4.2. Within the body of the method, write one line of code to return a string which combines both the first name and last name. 2. Add Class GraduateStudent 2.1. Create a Class GraduateStudent that is derived from or inherits from the Student class. 2.2. Graduate students have a Master's thesis. Create fields for the thesis. Choose appropriate names and data types. 2.3. Create Property for the thesis. 2.4. Create a parameterless constructor. 2.5. Create an overloaded constructor with firstName as a parameter. Within the declaration, call the overloaded Student (base) constructor and pass it the firstName

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions