Question: Write a C program using t he macro definitions and structure definitions as detailed below to store data for employees working at a department at
Write a C program using the macro definitions and structure definitions as detailed below to store data for employees working at a department at a university and the courses offered by them. #define COURSENAMELENGTH 50 // DERS ADI UZUNLUGU #define COURSECODELENGTH 10 // DERS KODU UZUNLUGU #define COURSESMAX 5 // Maximm des yk #define DIPLOMAMAX 5 // Maximm Diploma says typedef struct fullName{ //tam ad char *name; //ad char *surname; //soyad }name_t; typedef struct dates{ //tarih int day; //gn char* month; //ay short year; //yl }date_t; typedef struct diploma{ //diploma char *facName; //faklte ad char *deptName; //blm ad char *level; //lisans, Yksek Lisans veya Doktora date_t dateAwarded; //diploma tarihi }diploma_t; typedef struct courseOffered{ //kaytl Dersler char courseName[COURSENAMELENGTH]; //ders ad char courseCode[COURSECODELENGTH]; //ders kodu date_t startDate; //dersin balang tarihi date_t endDate; //dersin biti tarihi }course_t; typedef struct employeeInfo{ /retmen bilgisi name_t employeeName; //retmen ad diploma_t dip[DIPLOMAMAX]; //diploma bilgisi course_t noCourses[COURSESMAX] //verdii derslerin listesi int age; //ya double salary; //maa date_t startDate; //ie Balang Tarihi
| date_t dateOfBirth; }employee_t; | //dogm Tarihi |
In your program perform functions to addEmployee(), addDiploma(), addCourse(), displayInstructorInfo() and displayCourseInfo(), printClass() and calculateCourseAverage(). Please remember that you are not allowed to use any global variables or file operations. All variables used must be local variables. I want to see how you pass parameters to functions. Please detail variables as they appear in memory using a diagram. Please provide your flowcharts and technical explanations to the programs along with well documented source code files. Inside the main() function, along with other variables you need, use the variable employee_t allEmployees to both populate the employee data of the university, as well as to display them.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
