Question
Design classes Person and Student with appropriate relation of inheritance. Each object of Person has to have a unique ID (of int), which has to
Design classes Person and Student with appropriate relation of inheritance. Each object of Person has to have a unique ID (of int), which has to be a parameter of all constructors. If the ID value (taken from the parameter) is not unique(among all objects of Person)then an appropriate exception has to be thrown. Each object of Student has to have all data defining the person (being student)and a unique index number within a university. The duplicate of index number within the same university should result in throwing an exception. The designs of both classes (in C++) should focus on all useful public functions and all private data members allowing for implementation of the specified requirements including checking of the correctness and throwing exceptions in appropriate cases. No instructions in C++ should be used in this part
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started