| |

Question: C++ language for solution You have been asked by the Registration department – Free Chegg Question Answer

Transcribed text From Image: . . . C++ language for solution 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 . . . . . . .
. . . 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 Events Handler with all the above options. (13.75) Make sure your code does not waste memory. (10.5) Proof that your code is working as expected by running your main function and testing each of the Events Handler 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) Code your solution using the online compiler: https://www.onlinegdb.com . .

Expert Chegg Question Answer:

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

Answer


***********************I have answered according to chegg policy.happy chegging **************************************

Here’s your C++ code:

#include <iostream>
#include <string>
using namespace std;
// 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;
        
        // parameterized constructor
        Product(string n, string desc, string s, string g, double p, int a)
        {
            name = n;
            description = desc;
            size = s;
            gender = g;
            price = p;
            ageGroup = a;
        }
};
// class to store Person details
class Person
{
    public:
        // data members
        string name, email, dob, phoneNumber, gender;
        
        // parameterized constructor
        Person(string n, string e, string d, string pn, string g)
        {
            name = n;
            email = e;
            dob = d;
            pn = phoneNumber;
            gender = g;
        }
        // default constructor
        Person(){}
};
// class to store Customer details
class Customer : public Person
{
    public:
        // data members
        string deliveryAddress, ccNumber;
        
        // parameterized constructor
        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;
        }
};
// class to store Employee details
class Employee : public Person
{
    public:
        // data members
        string civilID, nationality;
        double salary;
        
        // parameterized constructor
        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(){}
};
// class to store Driver details
class Driver : public Employee
{
    public:
        // data members
        string dlNumber;
        
        // parameterized constructor
        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(string dln)
        {
            dlNumber = dln;
        }
};
// 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;
        }
};
// class to store DriverManager details
class DriverManager : public Manager, public Driver
{
    public:
        // parameterized constructor
        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;
}

Screenshots of the program:

<img src="https://media.cheggcdn.com/coop/13d/13d70a9c-877e-4836-97f9-cf03f885e5b0/1626362923460_Screenshot565.png" alt="main.cpp 1 2 8 10 12 14 15 16 17 18 = 20 22 23 #include <iostream> #include
69 59 // class to store Employee details 60 class Employee : public Person 61 { 62 public: 63 // data members 64 string civil
main.cpp TO/ : Employee(n, e, d, pn, g, cid, na, s) 7 calling super class constructor 108 { 109 numberOfSales nos; 110 } 111

Inheritance diagram:

Product Person Customer Employee Driver Manager Salesman Driver Manager Salesman Manager

*****************************Please give an upvote I really need it.happy chegging *******************************


Free Chegg Question Answer

Leave a Reply

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