| |

Question: Write a c++ language for this question (please Read the question carefully) • You have been asked by the Registration department in our college to design and implement their IT system. • – Free Chegg Question Answer

Write a c++ language for this question (please Read the question carefully) • You have been asked by the Registration departm
. . Your code should be efficient without any memory waste Draw an inheritance Hierarchy (10.5) • Code the Main Classes using
Transcribed text From Image: Write a c++ language for this question (please Read the question carefully) • You have been asked by the Registration department in our college to design and implement their IT system. • They told you that the system should record the information related to their Classrooms and Students. • Every Classroom in the system should contain basic information like: Course Name, Course Number, Major, Academic Year, Session, Teacher Name, Start Time, End Time, Location, Days, and List of Pre-Requisite Courses Numbers. • Every Student in their system should contain basic information like: Name, Civil ID, Email, Date of Birth, Phone Number, Gender, Major, GPA, List of finished Courses with the Grades. • You should note that the Computer Science Classrooms are usually small with an average of 10 Students while the Education Classrooms are large with an average of 20 Students. • You should code a Main function that would never stop until the user close it. You need an EvnetsHandler that gives a Menu with the following options: • Add a new Classroom (No two classrooms should have the same names and numbers and Sessions) • Add a new Student to a Classroom (No two students should have the same civil IDs) Delete Student from a Classroom • Delete a Classroom with all the Registered Students in it Print the Details of a Classroom (And Students in that Classroom) Exit the Program . . . 1
. . Your code should be efficient without any memory waste Draw an inheritance Hierarchy (10.5) • Code the Main Classes using the minimum number of Classes (Hint: use inheritance and overriding functions!) (12) • Code the EventsHandler with all the above options. (13.75) • Make sure your code does not waste memory. (/0.5) • Proof that your code is working as expected by running your main function and testing each of the EventsHandler Options. You should add at least one Computer Science Classroom and one Education Classroom with at least 15 students in each Classroom. Copy (or take a Screenshoot) of your test and attach it with your submission. (11.25)

Expert Chegg Question Answer:

free chegg question answer
Smart Teacher From Answerie.com
Answer:

Answer


ANSWER:

//including headerfiles
#include <iostream>
#include <string>
using namespace std;
// declare a class to store Product details
class Product
{
public:
// data members
string name, description, origin, fabric, condition;
string color, size, gender, notes;
double price;
int ageGroup;
  
// taking product constructor with params -parameterized constructor
Product(string n, string desc, string s, string g, double p, int a)
{
//initialising
name = n;
description = desc;
size = s;
gender = g;
price = p;
ageGroup = a;
}
};
// declare a class to store Person details
class Person
{
public:
// data members
string name, email, dob, phoneNumber, gender;
  
// parameterized constructor (person
Person(string n, string e, string d, string pn, string g)
{
name = n;
email = e;
dob = d;
pn = phoneNumber;
gender = g;
}
// a default constructor
Person(){}
};
//declare a class to store Customer details
class Customer : public Person
{
public:
// data members
string deliveryAddress, ccNumber;
  
// parameterized constructor customer
Customer(string n, string e, string d, string pn, string g, string da, string ccn)
: Person(n, e, d, pn, g) // calling super class constructor
{
deliveryAddress = da;
ccNumber = ccn;
}
};
// declare a class to store Employee details
class Employee : public Person
{
public:
// data members
string civilID, nationality;
double salary;
  
// parameterized constructor Employee
Employee(string n, string e, string d, string pn, string g, string cid, string na, double s)
: Person(n, e, d, pn, g) // calling super class constructor
{
civilID = cid;
nationality = na;
salary = s;
}
// default constructor
Employee(){}
};
// declare a class to store Driver details
class Driver : public Employee
{
public:
// data members
string dlNumber;
  
// parameterized constructor driver
Driver(string n, string e, string d, string pn, string g, string cid, string na, double s, string dln)
: Employee(n, e, d, pn, g, cid, na, s) // calling super class constructor
{
dlNumber = dln;
}
  
// parameterized constructor driver
Driver(string dln)
{
dlNumber = dln;
}
};
// declare a class to store Salesman details
class Salesman : public Employee
{
public:
// data members
int numberOfSales;
  
// parameterized constructor
Salesman(string n, string e, string d, string pn, string g, string cid, string na, double s, int nos)
: Employee(n, e, d, pn, g, cid, na, s) // calling super class constructor
{
numberOfSales = nos;
}
// parameterized constructor
Salesman(int nos)
{
numberOfSales = nos;
}
};
// class to store Manager details
class Manager : public Employee
{
public:
// data members
double bonus;
  
// parameterized constructor
Manager(string n, string e, string d, string pn, string g, string cid, string na, double s, double b)
: Employee(n, e, d, pn, g, cid, na, s) // calling super class constructor
{
bonus = b;
}
// method to increse salary of Salesman
void increseSalary(Salesman s)
{
if(s.numberOfSales > 10)
s.numberOfSales = s.numberOfSales * 105 / 100;
else if(s.numberOfSales > 5)
s.numberOfSales = s.numberOfSales * 102 / 100;
}
};
// declare a class to store DriverManager details
class DriverManager : public Manager, public Driver
{
public:
// parameterized constructor driver manager
DriverManager(string n, string e, string d, string pn, string g, string cid, string na, double s, string dln, double b)
: Manager(n, e, d, pn, g, cid, na, s, b), Driver(dln) // calling super class constructor
{}
  
};
// class to store SalesmanManager details
class SalesmanManager : public Manager, public Salesman
{
public:
// parameterized constructor
SalesmanManager(string n, string e, string d, string pn, string g, string cid, string na, double s, int nos, double b)
: Manager(n, e, d, pn, g, cid, na, s, b), Salesman(nos) // calling super class constructor
{}
  
};

int main()
{
return 0;
}


INHERITANCE DIAGRAM :-

[ Product Person Customer employee Diver salesman manager Driver ver manager salesman manager

Free Chegg Question Answer

Leave a Reply

Your email address will not be published. Required fields are marked *