| | |
Design and Implement a class hierarchy for an organization/university
![]() |
•
•
Join Date: Feb 2006
Posts: 7
Reputation:
Solved Threads: 0
Design and implement a class hierarchy for any organization, employees. We are interested in modeling only the Managers and Faculty. Director shall be treated as a Manager. The following information for each employee needs to be captured:
First Name, Middle Initial, and Last Name
All of above are of type string except Middle Initial that is of type Character.
All Managers belong to certain Level which are numbered 3 through 5 and
all managers must belong to one of the university department (a string).
Director, though Manager, does not belong to any level and also does not belong
to any department. Each faculty member is either professor, Associate or
Assistant Professor and belongs to some department.
We are only interested in creating objects of different types of employees
(i.e. Managers, Faculty Members, or Director) and to print the relevant
information for each employee in the following format.
for Manager the output of function should be of the form:
First Name, Middle Initil, Last Name Department Level
for Director the output of function should be of the form:
First Name, Middle Initil, Last Name “Director�
for Faculty the output of function should be of the form:
First Name, Middle Initil, Last Name Department Position
a) Show a complete class diagram against the system described above.
b) Implement Manager and Director Classes described in the class diagram above.
c) Implement a global non-template method PrintDetail() that accepts any kind of university employee and print all its relevant details.
First Name, Middle Initial, and Last Name
All of above are of type string except Middle Initial that is of type Character.
All Managers belong to certain Level which are numbered 3 through 5 and
all managers must belong to one of the university department (a string).
Director, though Manager, does not belong to any level and also does not belong
to any department. Each faculty member is either professor, Associate or
Assistant Professor and belongs to some department.
We are only interested in creating objects of different types of employees
(i.e. Managers, Faculty Members, or Director) and to print the relevant
information for each employee in the following format.
for Manager the output of function should be of the form:
First Name, Middle Initil, Last Name Department Level
for Director the output of function should be of the form:
First Name, Middle Initil, Last Name “Director�
for Faculty the output of function should be of the form:
First Name, Middle Initil, Last Name Department Position
a) Show a complete class diagram against the system described above.
b) Implement Manager and Director Classes described in the class diagram above.
c) Implement a global non-template method PrintDetail() that accepts any kind of university employee and print all its relevant details.
•
•
•
•
Originally Posted by bashi
Design and implement a class hierarchy for any organization, employees. We are interested in modeling only the Managers and Faculty. Director shall be treated as a Manager. The following information for each employee needs to be captured:
Not to say that means it's a total no-brainer, but come on, do a bit of reading! you've been given all the information on a nice big round plate, you just need to work those brain cells a little to seperate it out.
•
•
•
•
Originally Posted by bashi
First Name, Middle Initial, and Last Name
All of above are of type string except Middle Initial that is of type Character.
•
•
•
•
Originally Posted by bashi
All Managers belong to certain Level which are numbered 3 through 5 and
all managers must belong to one of the university department (a string).
Director, though Manager, does not belong to any level and also does not belong
to any department. Each faculty member is either professor, Associate or
Assistant Professor and belongs to some department.
•
•
•
•
Originally Posted by bashi
We are only interested in creating objects of different types of employees
(i.e. Managers, Faculty Members, or Director) and to print the relevant
information for each employee in the following format.
•
•
•
•
Originally Posted by bashi
for Manager the output of function should be of the form:
First Name, Middle Initil, Last Name Department Level
for Director the output of function should be of the form:
First Name, Middle Initil, Last Name “Director�
for Faculty the output of function should be of the form:
First Name, Middle Initil, Last Name Department Position
•
•
•
•
Originally Posted by bashi
a) Show a complete class diagram against the system described above.
b) Implement Manager and Director Classes described in the class diagram above.
c) Implement a global non-template method PrintDetail() that accepts any kind of university employee and print all its relevant details.
So, which field names are common to all your classes? these 'common' attributes will be inside your base class.. and inherited by the derived classes.
(HINT - in a good system, data shouldn't be dupilicated anywhere unnecessarily)
•
•
•
•
Originally Posted by bashi
thnks for your repy bench i will do the code part if u can help me plz do hlp me in this i cant understand how i will Show a complete class diagram against the system described above.
i hope u will help me.
I'm here to prove you wrong.
•
•
•
•
Originally Posted by bashi
thnks for your repy bench i will do the code part if u can help me plz do hlp me in this i cant understand how i will Show a complete class diagram against the system described above.
i hope u will help me.
Take, for example, a diagram involving modes of road transport - You need to know some information about all types of transport, like what's the vehicles manufacturer & model? for specific types, like a Car, you want to know about it's engine - although Bicycles don't use engines, but Bicycles will have Reflectors on them to make them more visible
Vehicle - Base Class- People_Capacity
- Manufacturer
- Model_Number
Car - Derived from Vehicle- Num_Of_Doors
- Engine_Size
Bicycle - Derived from Vehicle- Frame_Type
- Num_Of_Reflectors
You should also include functions, for example, the base class could have a Change_Gear() function, as both Bicycles and Cars use gears - however, only Cars might have a Start_Engine() function.
![]() |
Similar Threads
- Design problems (Python)
- Factory Design pattern implementation (C++)
- class rectangle (Java)
Other Threads in the C Forum
- Previous Thread: pls help me to convert char to integer.
- Next Thread: Audio measurement dll using sound card?
| Thread Tools | Search this Thread |
* adobe api array arrays binarysearch calculate centimeter char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling gtkwinlinux hacking hardware highest homework i/o ide inches incrementoperators intmain() iso km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat opensource openwebfoundation pattern pdf performance pointer posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition scanf scheduling segmentationfault send shape single socketprograming socketprogramming stack standard strchr string suggestions test unix urboc user variable voidmain() whythiscodecausesegmentationfault win32api windows.h






