Question

In: Computer Science

Description In C# Further enhance the registration program for Continental University. Add more attributes about a...

Description

In C#

Further enhance the registration program for Continental University.

  • Add more attributes about a student, including gender, residency (in-state or out-state), and entrance date.
  • Allow the user to repeatedly enter student information until the user wants to quit.
  • When the user enters an invalid value, ask the user to repeatedly enter the value until a valid value has been entered. Gender must be ‘M’ or ‘F’. Residency must be ‘I’ or ‘O’.
  • Display a short summary after each reservation has been entered. Display a title (Mr. or Ms.) depending on the gender. Capitalize the first name and last name.

Existing Code:

class Program {
  static void Main() {
      Student s = new Student();
    Console.WriteLine("Welcome to the Continental University Registration System!");
    Console.WriteLine("Enter data about a student");
    Console.Write("First Name: ");
    string firstName=Console.ReadLine();
    Console.Write("Last Name: ");
    string lastName=Console.ReadLine();
    
    Console.Write("Credits Taking: ");
    int credits=Convert.ToInt32(Console.ReadLine());
    s.firstName=firstName;
    s.lastName=lastName;
    s.credits=credits;
    Console.WriteLine(s);
    
  }
}
class Student  {  
                public string firstName;
                public string lastName;
                public int credits;
                   public override string ToString(){
                       
                    return lastName+", "+firstName+" Credits Taking: "+credits;
                   }
                        
} 

Sample Dialog

Welcome to the Continental University Registration System!

Enter data about a student

First Name: Mary

Last Name: Smith

Gender (M/F): f

Residency (I/O): i

Credits Taking: 18

Entrance Date: 12/13/2018

Mr. Smith, Mary Credits Taking: 18 Entrance: 12/13/2018 In-state

Do you want to quit (Y/N)?: n

Enter data about a student

First Name: LERNIE

Last Name: BLAKE

Gender (M/F): X

Gender (M/F): M

Residency (I/O): X

Residency (I/O): O

Credits Taking: 12

Entrance Date: 10/01/2018

Mr. Blake, Lernie Credits Taking: 12 Entrance: 10/01/2018 Out-state

Do you want to quit (Y/N)?: Y

Thank you for using the Registration System!

Solutions

Expert Solution


Related Solutions

In C# Start to develop a registration program for Continental University. At this stage of development,...
In C# Start to develop a registration program for Continental University. At this stage of development, the program only needs to keep track of some basic information about a student, including first name, last name, and number of credits taking. You will gradually enhance the program in subsequent assignments. You need to implement a class named Student that represents a student, and a testing program. The testing program should prompt the user to enter the data about a student and...
C# Programming (Class Registration class) Add a Schedule property to the Person class. Add a new...
C# Programming (Class Registration class) Add a Schedule property to the Person class. Add a new behavior as well: add(Section s) this behavior will add a section to the Person’s schedule. The Person’s display() function will also need to be modified to display() the Person’s Schedule. Schedule class has Properties: An array of Sections and a Count. Constructors: only a default constructor is needed. Behaviors: add() and display(). This is my schedule class class Schedule     {         private int...
Create a description of a university course registration system. You should include features for students, faculty,...
Create a description of a university course registration system. You should include features for students, faculty, and administrators. For example, students need to use the system to add and drop courses that they attend, faculty needs to add and drop courses that they offer and the Registrar needs to allocate and de-allocate resources for courses that are added or dropped. Each type of user also has to satisfy some constraints, such as how many courses they take (students), teach (faculty)...
Complete the java program. /* Note: Do not add any additional methods, attributes. Do not modify...
Complete the java program. /* Note: Do not add any additional methods, attributes. Do not modify the given part of the program. Run your program against the provided Homework2Driver.java for requirements. */ /* Hint: This Queue implementation will always dequeue from the first element of the array i.e, elements[0]. Therefore, remember to shift all elements toward front of the queue after each dequeue. */ public class QueueArray<T> { public static int CAPACITY = 100; private final T[] elements; private int...
Build a C program project about Personal diary which will have daily note add, remove ,...
Build a C program project about Personal diary which will have daily note add, remove , edit , search, and view notes system. Write the appropriate comment in your code. Comment writing is mandatory. describe your logic, purpose of a function, purpose of the variable etc need to be described in the comment.
*********C++ Program************ Enhance the Account class to compute the interest on the current balance. An account...
*********C++ Program************ Enhance the Account class to compute the interest on the current balance. An account has initial balance of $10,000.00, and 6% percent annual interest is compounded monthly until the investment is double. Write a main function to determine the number of months to double the initial investment. Create function name "double investment" for this project. Create a menu to allow the user to enter the initial investment and the annual interest rate. Please create a header file(bank.h) and...
Write a program in C language 1- Define a struct for students with the aforementioned attributes,...
Write a program in C language 1- Define a struct for students with the aforementioned attributes, test it by populating one initialized struct variable with arbitrary input and take screenshots of the output. 2- For each student, struct add an array of number grades for a class the students are enrolled in such as S E 185. Then write functions which find the max, average, and minimum score for a specified assignment identified by a number, for example, Assignment 0...
write a C++ program to CREATE A CLASS EMPLOYEE WITH YOUR CHOICE OF ATTRIBUTES AND FUNCTIONS...
write a C++ program to CREATE A CLASS EMPLOYEE WITH YOUR CHOICE OF ATTRIBUTES AND FUNCTIONS COVERING THE FOLLOWING POINTS: 1) COUNTING NUMBER OF OBJECTS CREATED ( NO OBJECT ARRAY TO BE USED) USING ROLE OF STATIC MEMBER 2) SHOWING THE VALID INVALID STATEMENTS IN CASE OF STATIC MEMBER WITH NON STATIC MEMBER FUNCTION, NON STATIC MEMBERS OF CLASS WITH STATIC MEMBER FUNCTION, BOTH STATIC. SHOW THE ERRORS WHERE STATEMENTS ARE INVALID. 3) CALL OF STATIC MEMBER FUNCTION, DECLARATION OF...
Add an item to a Text File / C++ the program will prompt for a filename...
Add an item to a Text File / C++ the program will prompt for a filename AND then prompt for a text file item. text file items always contain an unknown amount of spaces, (see getline). Allow the user to put both the filename and the extensions, like groceries.txt or retirementToDo.clist Don't add any directory information to the filenames, use them as typed. If the file does exist, the item will be APPENDED to the end of the file. If...
Please code in C# - (C - Sharp) Assignment Description Write out a program that will...
Please code in C# - (C - Sharp) Assignment Description Write out a program that will ask the user for their name; the length and width of a rectangle; and the length of a square. The program will then output the input name; the area and perimeter of a rectangle with the dimensions they input; and the area and perimeter of a square with the length they input. Tasks The program needs to contain the following A comment header containing...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT