Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 1 [70 MARKS] We would like to create a program to store information of

ID: 3706404 • Letter: Q

Question



QUESTION 1 [70 MARKS] We would like to create a program to store information of two students and staffs for two faculties. The sample data memory for one faculty is as illustrated in Table I Table 1 char name [20 char status [10] float CGPA float weight float height char name [20] char status[10] float CGPA float weight float height char name [20] char status [10] float salary float weight float height char name [20] char status [10] float salary loat weight float height student[0] student [1] facultyt0] staff [01 staff[1]

Explanation / Answer

a) Design Own Data Structure program :

#include <iostream>
#include <string.h>

using namespace std;

class Student
{
// Access specifier
public:

// Data Members
char name[];
char status[20] = "student";
float GCPA;
float weight;
float height;

  
};

class Staff
{
// Access specifier
public:

// Data Members
char name[20];
char status[20] = "staff";
float GCPA;
float weight;
float height;
  

  
};

class Faculty
{
// Access specifier
public:

Student students[2];
Staff staffs[2];
  
};

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote