Write a program to help a university system to store records for its employee. You have to perform the following tasks: 1. Define a struct facultyMemberwith the following attributes: • ID number (int) • First Name (string) • Last Name (string) • Designation (string) e.g. Assistant professor, Lecturer etc. 2. Implement a function “void newrecord(facultyMember & fm)",which will take an argument of Faculty:Member type, input values for all the attributes from user, and store it in the argument variable. 3. Implement a function “void printdetails(facultyMember fm)", whichwill print the values of the variable fm passed as an argument. 4. Implement your main function. Declare a variable of FacultyMember type. Assign values to it using NewRecord function. Print its values using PrintDetails function. 5. Now, declare a FacultyMember type array of size 3 in main( ). Fill the values using newRecord function. (Note that your newRecord can assign value to a single FacultyMember type variable and you cannot change the prototype). 6. Print the values of the above array using PrintDetails Function without changing the prototype. 7. Implement a function “void sortid(facultyMember fm [], int size)", which takes a FacultyMember type array as an argument and its maximum size. You have to sort this array in ascending order with respeet to the ID number (use any sorting algorithms). Be careful while swapping the two locations of array.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.2: Providing Class Conversion Capabilities
Problem 6E
icon
Related questions
Question
100%

write a c++ program

Write a program to help a university system to store records for its employee. You have to
perform the following tasks:
1. Define a struct facultyMemberwith the following attributes:
• ID number (int)
• First Name (string)
• Last Name (string)
• Designation (string) e.g. Assistant professor, Lecturer etc.
2. Implement a function “void newrecord(facultyMember & fm)",which will take an
argument of FacultyMember type, input values for all the attributes from user, and store it in
the argument variable.
3. Implement a function "void printdetails(facultyMember fm)", whichwill print the values
of the variable fm passed as an argument.
4. Implement your main function. Declare a variable of FacultyMember type. Assign values to
it using NewRecord function. Print its values using PrintDetails function.
5. Now, declare a FacultyMember type array of size 3 in main( ). Fill the values using
newRecord function. (Note that your newRecord can assign value to a single FacultyMember
type variable and you cannot change the prototype).
6. Print the values of the above array using PrintDetails Function without changing the
prototype.
7. Implement a function "void sortid(facultyMember fm [], int size)", which takes a
FacultyMember type array as an argument and its maximum size. You have to sort this array
in ascending order with respect to the ID number (use any sorting algorithms). Be careful
while swapping the two locations of array.
Transcribed Image Text:Write a program to help a university system to store records for its employee. You have to perform the following tasks: 1. Define a struct facultyMemberwith the following attributes: • ID number (int) • First Name (string) • Last Name (string) • Designation (string) e.g. Assistant professor, Lecturer etc. 2. Implement a function “void newrecord(facultyMember & fm)",which will take an argument of FacultyMember type, input values for all the attributes from user, and store it in the argument variable. 3. Implement a function "void printdetails(facultyMember fm)", whichwill print the values of the variable fm passed as an argument. 4. Implement your main function. Declare a variable of FacultyMember type. Assign values to it using NewRecord function. Print its values using PrintDetails function. 5. Now, declare a FacultyMember type array of size 3 in main( ). Fill the values using newRecord function. (Note that your newRecord can assign value to a single FacultyMember type variable and you cannot change the prototype). 6. Print the values of the above array using PrintDetails Function without changing the prototype. 7. Implement a function "void sortid(facultyMember fm [], int size)", which takes a FacultyMember type array as an argument and its maximum size. You have to sort this array in ascending order with respect to the ID number (use any sorting algorithms). Be careful while swapping the two locations of array.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Function Arguments
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning