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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education