Answered step by step
Verified Expert Solution
Question
1 Approved Answer
pleass write it in C++ 1) Define a Dafe class containing three private attributes day, month, and year. a. Provide this class with a constructor
pleass write it in C++
1) Define a Dafe class containing three private attributes day, month, and year. a. Provide this class with a constructor allowing the initialization of its attributes. Dater int, int, int); you have to use the default values b. Provide a set and a get method for each data member. c. Create a method to compare the current object with another, and return false if the eurfent object. is the lowest one 2) Write a class Person that has three private data members: fullName, phone Vumber, and birthdiey - Provide 2 constructors: - Without parameters. Person()/it has to contain coutce" Person() constructor runs" a. With three parameters: Person (string, string, Date & )/it has to contain coutce" Person(string,string) constnuctor runs" - Provide destructor print a message. /it has to contain coutse" Person destructor runs" - Provide a set and a get method for cach data member. - Provide a display method. void priniliniod 3) Define a Student class inheriting from the Person class and having the student/d. - Provide this class with a constructor allowing you to create a 5 rudent from their fidiunwis. phoncnumber.birthden.sfudentlel. - Clconstructor has to contrin coutse" student constructor runs" - And the following methods: - Nond printinfo(Gewhich displays the student's aftributes. - Provide a set and a get method for cach data member. 4) Define a CiraduateStadeat class inheriting from the Student class and having the following private attribute: GPA. - Provide this class with a constructor allowing you to create a GraduateStudent from their full name, phonenumber,birfhey spulentld. GRA. - Heonstructor has to contain coutce" graduatestudent constnuctor runs" - And the following methods: - void printinfon which displays the student's attributes. - Provide a set and a get method for each data member. Write the main function: - Create one Date object named DI - Create one Person object with arguments named Pl - Print the person's information - Create one Student object named S1 - Show the Student's atributes - Creates one Graduatestadent named Gisl - Display all the Gsil's information. write your classes in a separate file (interface k implementation files), you have to use a preprocessor directive for each class Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started