Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Develop a set of classes for a school and use various studen service and personn

ID: 3622464 • Letter: D

Question

Develop a set of classes for a school and use various studen service and personnel applications.
Classes needed to be designed are Person: first, last name, street address, zip phone number and a method that sets each data field, using a series of dialog boxes and a display method that dis0plays all of a Person's informaion oa single line at eh command line on the screen. Second class: CollegeEmployee- descend from person. CollegeEmployee also includes S.S. annual salary, department name and methods that override the Person methods to accept and issplay all CollegeEmployee data.
Third class; Faculty- Faculty descend from CollegeEmployy. Class included Boolean filed that indicates wherther the Faculty member is tenured and methods overide CollegeEmployee methods to accept anddisplay this additional poece of information.
Fourth Class: Studen- Student descends from Person. fields available in Person, a Student contains a major fieldof study and a grade point average, as well as methods that overide the Person methods to accept and display these additional facts.
Write an application named CollegeList that dexlares an array of four "regular"CollegeEmployees, three Faculty and seven Students. Prompt the user to specity which type of person's data will be entered ('C',"F","S") or allow user to quit('Q'). While the user chooses to continue accept date entry for approopriate type of Person. If user attempts entering data more than four CollegeEmployees, three Faculty, or seven Students, display and error. When user quits, display report on screen listing each group of Persons under the appropriat heading CollegeEmployees, Faculty or Students. If user has not entered data for one or more types of Persons during a session, display an appropriate messge under the appropriate heading.
I have not worked with more than one class in one program and don't know where to place the additional information.

#include <iostream.h>
#include <stdlib.h>
#include <cstring>
#include <cctype>

class Student
{
private:
char Name[80];
long SSN;

public:
Student (char, long);
void setSSN (int SSN);
void setName (intName);
int getSSN (long);
int getName (char);

};
Student::Student (char Name,long SSN)
{
char Name [80]= "unassigned";
long SSN = 999999999;
}
int Student::getName()
{
return Name;
}
int Student::getSSN()
{
return SSN;
}
void Student::setName(int name)
{
int name = "Scott Rog"
}
void Student::setSSN(int ssn)
{
int ssn = 123456789
}
void printName(Student*nameprint);
void updateName(Student*nameprint);
void print SSN(Student*ssnprint);
void update SSN(Student*ssnprint);

int main()
{
Student S1,S2;
cout<<S1.GetName()<<endl;
cout<<S1.getSSN()<<endl;
S2.setName("Scott Rog");
S2.setSSN(123456789);
cout<<S2.getName()<<endl;
cout<<S2.getSSN()<<endl;
}




Explanation / Answer

Working with multiple classes in a single file is perfectly legal. What you may be confused on is inheritance. When one class is a descendant of another, it inherits its parent's members (except for constructors, destructors, and operators). You can then add additional objects to the class as well as overload parent functions. A great tutorial is found here: http://www.cplusplus.com/doc/tutorial/inheritance/ The key here is that you can use the base class as a container and switch between descendant classes seamlessly. For example, once you implement these four classes, the following would be legal (and useful). Person* p; p = new Student(); //p is now an instance of Student //... p = new Faculty(); //p is now an instance of Faculty