Please solve aC++ !!

Date class
● Day, Month, and Year
● A default and User-defined constructor
● Function to setDate with month, day, and year
○ You should validate the date ; 12/03/2021 is a valid date while 33/6/2021 is not. Hint: use the calendar to determine how many days in each month.
● Function to print the date in nice format 12/03/20121 (overload cout << ) ● A member function to increment a specified date with a specified integer
value. You should deal with all special cases, I mean when the day is 30 or .31
Date d1(19,6,2021) ;
Date d1=d1+1;
cout<<d1;
It should print 20/6/2021
2. Employee Class
● First name, last name,Salary, BirthDate , and HireDate. BirthDate and
HireDate should be objects from the previous Date class.
● A user defined constructor with the four arguments(First name, last
name,BirthDate , and HireDate).
● Friend function to overload cout << employee
3. The main should test the following tasks

  1. Read information of employees from a file and store them in an array of employees.
    File structure
    #of Employee
    firstname lastname salary birthdate hiredate 2
    Ali Ahmad 3000 12/4/1999 9/3/2006
    Samia Khalid 2700 12/8/2002 29/6/2020
    
  2. Print all Employees.
  3. A function that takes an array of employees and a specified filter such as hire date and prints and returns a new array with all employees that satisfied that filter. Write at least two reasonable functions.
  4. A function that creates a new employee and appends it to the existing file. You should update the number of employees in the first line of file.

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / repl.it / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.