Instructions Complete the following tasks: Use the Class Wizard in Visual Studio to create a class called Student. (Note that the Class Wizard will automatically create the .h and .cpp files.) Your Student class should have the following class members/properties: studentID, firstName, lastName, and studentStatus. (Note that the studentStatus member will be of type Status, which is an enum you will create.) Create a default constructor and a constructor that requires only the Student Id, first name, and last name. (The studentStatus member should not be initialized at this time.) Create a member function called getStudentInfo() that returns a string that contains the students first name, last name, and their status. Create a destructor for the Student class. (Note that the Class Wizard automatically includes a destructor.) Add a status.h file to the solution. Then add a Status enumeration to that file with the following entries: Attending, NonAttending, and Graduated. Then include this file in your class file. Add #pragma once to all of your header files Write a simple program that asks the user for the Student Id, first name, and last name of the student. Then instantiates a new student object with this information. Ask the user if the student is presently attending the school. If the user states "no", ask if a degree was obtain. Use the ternary operator to set studentStatus member of the object to either NonAttending or Graduated based on whether a degree was obtained. If the user states that the student is attending, set the studentStatus to Attending. Display the student's information by calling the getStudentInfo() member function. Add the following to your program: Create a new variable in your main called numStudents to store the number of students to add to the system. Create an array of size 20 called students[] to hold all of the student objects. Create a function called getNumStudents() which will obtain the number of students to add. This function will ask the user for the number of students to add and store that number into the numStudents variable. The numStudents variable should be passed by reference to the function. (Note that because this number will be used in the array, it must be validated to be >= 0 and <= 20.) Use function prototypes as described in your textbook. Use the newly initialized numStudents variable in the main() to create a loop that adds that many student objects to the array. Create getter and setter member functions for each of the members of the class. These functions should be implemented in the header file. (Be sure to mark your getters as const.) Finally, create a function called displayStudents() that accepts an array of student objects and iterates through that array to display all of the students and their information by calling the getters. The function should use the member function getStudentInfo().

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Instructions Complete the following tasks: Use the Class Wizard in Visual Studio to create a class called Student. (Note that the Class Wizard will automatically create the .h and .cpp files.) Your Student class should have the following class members/properties: studentID, firstName, lastName, and studentStatus. (Note that the studentStatus member will be of type Status, which is an enum you will create.) Create a default constructor and a constructor that requires only the Student Id, first name, and last name. (The studentStatus member should not be initialized at this time.) Create a member function called getStudentInfo() that returns a string that contains the students first name, last name, and their status. Create a destructor for the Student class. (Note that the Class Wizard automatically includes a destructor.) Add a status.h file to the solution. Then add a Status enumeration to that file with the following entries: Attending, NonAttending, and Graduated. Then include this file in your class file. Add #pragma once to all of your header files Write a simple program that asks the user for the Student Id, first name, and last name of the student. Then instantiates a new student object with this information. Ask the user if the student is presently attending the school. If the user states "no", ask if a degree was obtain. Use the ternary operator to set studentStatus member of the object to either NonAttending or Graduated based on whether a degree was obtained. If the user states that the student is attending, set the studentStatus to Attending. Display the student's information by calling the getStudentInfo() member function. Add the following to your program: Create a new variable in your main called numStudents to store the number of students to add to the system. Create an array of size 20 called students[] to hold all of the student objects. Create a function called getNumStudents() which will obtain the number of students to add. This function will ask the user for the number of students to add and store that number into the numStudents variable. The numStudents variable should be passed by reference to the function. (Note that because this number will be used in the array, it must be validated to be >= 0 and <= 20.) Use function prototypes as described in your textbook. Use the newly initialized numStudents variable in the main() to create a loop that adds that many student objects to the array. Create getter and setter member functions for each of the members of the class. These functions should be implemented in the header file. (Be sure to mark your getters as const.) Finally, create a function called displayStudents() that accepts an array of student objects and iterates through that array to display all of the students and their information by calling the getters. The function should use the member function getStudentInfo().

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 8 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education