Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Major class and Student class with two different private attributes for both major and student class respectively; major name, and number of credits

image text in transcribed

Create a Major class and Student class with two different private attributes for both major and student class respectively; major name, and number of credits and a public member function displayMajorInfo() and student name, age, major and a public member function displayStudentInfo(). c++ in the form above picture

A class can have as a member an object from another class. Code 14.12: Class composition example #include 2 #include 3 using namespace std 4 /sBirthday Class/ 5 class Birthday 6 private: int mont, day, year; 8 public: Birthday (int m int d, int y) : month (m, day (d),year(y) [ 10 12 13 14 15 16 Person Class**/ 17 class Person l 18 private; 19 20 21 public: void printDate O cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions