QUESTION 1 [70 MARKS] We would like to create a program to store information of
ID: 3706404 • Letter: Q
Question
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];
};
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.