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

I could really use some help on this program. It was due yesterday so I can no l

ID: 3546262 • Letter: I

Question

I could really use some help on this program. It was due yesterday so I can no longer receive credit for this, but I need to understand the concepts of what the program is doing so I can complete this weeks assignemnt. If you guys could help me out with how this program should have been coded with comments that would be extremely helpful.



Program Requirements:


1) Create a class named Student.  The class should consist of the following private member variables: social security number and name (last, first or first, last?).  The social security number (SSN) should be a long integer.  The name variable must be a character array of 80 characters.


2) Create the following class member functions: setSSN, getSSN, setName, getName.  Each of these member functions should be public.

   2a) The setSSN function should accept 1 argument and update the the social security       number member variable.  Do not allow the the social security number to be set to zero or less than zero.  The getSSN should return the class SSN.

   2b)The setName member function should accept one string argument.  Use the argument to update the name class member variable.   Do not update the class variable for name if the argument has a length of 0. (This indicates the name in the argument is "empty".) The getName method should return the class value for name.


3) Create a default constructor for the Student class.  This constructor will accept no arguments.  Use the default constructor to initialize the social security number to 999999999 and the name to "unassigned".


4) Make sure all your methods are defined in the implementation section of the class.  Do not use any inline class member functions.


5) Create a main function.  In the main function create two Student objects.  Use the appropriate get functions to print all the values of all the member variables for the first Student object.  For the second object, use the set methods to change the student name to **John Doe** and the social security number to **123456789**.  Use the appropriate get functions to print all the values of all the member variables for the second Student object.

Do not print from the Student class.  Instead you will retrieve the data in the main() function and print from main.


the output should be:


Name for student1 is *unassigned* and ssn is *999999999*


Name for student2 is *John Doe* and ssn is *123456798*




any help at all is appreciated.

thanks.

Explanation / Answer

I could really use some help on this program. It was due yesterday so I can no l

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote